Jump Jump
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
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
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
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
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
Is it possible to help me with detailled information about the player and the walls
thank you
we just added wall jumping
Cant someone help me
@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
Alex
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