I Cant Jump
Deadman
Member Posts: 3
Hello,
First up - I a newbie to this system. And i think its a great program!
Second - i cant get my Actor to jump. I set him up, he's on a scene, there is standard gravity value, and i have set a Timer rule which adds 300 velicity for 1 second when i press "W". Everthing looks good.I preview the game. I press "A" and "D" and he moves left and right, and then I press "W" and.....nothing. No movement at all.
I am very new to all this, and I have looked through the forum and found the "Jump" related posts and tried them. But noneof them see mto work, or look like anything ive tried...Any ideas you Experts?
First up - I a newbie to this system. And i think its a great program!
Second - i cant get my Actor to jump. I set him up, he's on a scene, there is standard gravity value, and i have set a Timer rule which adds 300 velicity for 1 second when i press "W". Everthing looks good.I preview the game. I press "A" and "D" and he moves left and right, and then I press "W" and.....nothing. No movement at all.
I am very new to all this, and I have looked through the forum and found the "Jump" related posts and tried them. But noneof them see mto work, or look like anything ive tried...Any ideas you Experts?
Comments
If you check around the wiki, how-to's, and forums you will find help.
Specifically:
http://gamesalad.com/wiki/how_to_gsc_jump
My CodeMonkey Random Tips section here in the forums.
http://gamesalad.com/wiki/how_to_know_which_movement_to_use For the reason why Jump doesn't work while you have the Move behavior.
Change Velocity takes effect instantly; it doesn't ramp up over time, and it doesn't "expire" when a timer ends. So with this behavior you wouldn't need a timer, you would simply do something like this:
When key W is down, Change Velocity [300, 90 degrees relative to scene]
If you want an effect that happens over time, try Accelerate. Codemonkey's first link has a good tutorial which uses an Accelerate behavior to jump. But the above is probably simpler (to help you debug).
Ok, what if - by some random chance - that all the above didnt work? If there any other method to make the Actor jump? I only have two actors thus far - "ground" + "player1"... Am I missing something fundemental?
It could help us if you tell us what behaviors you used.
Rule: When key pressed W is down
--Timer For 1 second
----???? 300 added velocity
Rule: When key pressed A is down
--??? (left movement)
....However now my Actor (who's is a human man) now keeps sliding around like he's on ice....cool effect - but the ground is supposed to act like grass....Move behaviour acted like i wanted but i changed it out for Accelerate which doesn't act quite the same.... any thoughts?