Jump Jump

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited November -1 in Working with GS (Mac)
Hey everyone,

I think I ask a quite often asked question, and I tryed to look for tutorials and so on.. but I don't get it.

I have a background picture with some vertical walls at different highs. And a actor which has to jump from wall to wall. Now what I started:

First I created a new actor called Solid which I resized exactly like the walls at the background. Then I went into my actor and set this:

Collide with Solide.
Then for left and right: Attribute, Accelerator to X and >< -0.1 and 0.1

But how do I programm jump? and is there anything else to know doing something like that?

Greetings

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    so your trying to get a wall jump going you mean?

    Never done one but this came to the to of my head and should give u some nice results

    I would use 2 attribute wallx and playerx

    constrain playerx to the players self postiion x

    in the wall actors(everywall actor) have a rule when actor collides with player change wallx to self position x

    then in the player have a rule when actor collides with wall, And self position x is greater then wallx (that tells that the player hit a left wall), and jump button is pressed, change attribute self motion x to 100 or something

    then another rule in the player when actor collides with wall, And self position x is less then wallx (that tells that the player hit a right wall), and jump button is pressed, change attribute self motion x to -100 or something
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Yeah but there is one problem.

    In this case the actor only jumps when colliding
    with the wall. The actor should also be able to jump even of there were no walls.

    Thanks
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Alex0407 said:
    Yeah but there is one problem.

    In this case the actor only jumps when colliding
    with the wall. The actor should also be able to jump even of there were no walls.

    Thanks

    then just add another rule in the player like so.

    When actor collides with wall
    now leave the rule blank and open up the otherwise section

    have a rule in the otherwise section when jump button is pressed or jump attribute=1 or whatver
    -change attribute self motion linear x to 300

    what that will do is whenever your NOT colliding with the walls and you press the jump button you jump straight up. Make the ground a seperate actor from the walls

    cheers
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    I am sorry but I understand nothing..

    Is it possible to help me with detailled information about the player and the walls :)

    thank you
  • sdsmith64sdsmith64 Member Posts: 221
    you may want to look at this http://gamesalad.com/forums/topic.php?id=33156

    we just added wall jumping
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Thank you Smith but I dont want to buy a Template and I remember that I do not asked for something like that!

    Cant someone help me :( ??
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    yeah lets keep the paid templates in the marketplace..

    @Alex i basically told you exactly what to do, if u dont understand i suggest you check out the videos on the gamesalad cookbook youtube chanel and gshelper.com to get some knowledge of gs. After watching those you should have no problem following my instructions.

    cheers
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Okey my actor jumps but he doesnt stop going upwards. I know that I have to set gravity to 1 but then my whole background picture also moves downwards ://

    Alex
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Update:

    I added some walls, and also set a rule for moving the character left, right and down.

    The problem now is:

    1,When the actor collides with the walls, he starts to circle around..not stopable^^
    2, How do I fix the problem that the character does not jump endless high, he gets stopped by a wall of course but I dont want him to be stopped by walls...

    Thanks
Sign In or Register to comment.