Actor isnt "jumping"

ZeroRavenZeroRaven Member Posts: 33
edited August 2013 in Working with GS (Mac)
Hi there, I know I post A LOT of questions. Time for one more.
I'm trying to get my actor to jump, up and down, as well as left and right. needless to say he's being finicky, To say the least.
I hit the space bar to jump and its more of a hop. same with left and right.
Im using attribute triggers to detect the "terrain" so he's not jumping in mid air. I'm also using the "Accelerate" function for the actual jump.
Please note scene gravity is 50. However the actor drag is 0, and accelerate speed is 300
Also the jump+left is shown. jump+right is just the opposite with the self.horizontal flip set to false.

http://i282.photobucket.com/albums/kk248/ZeroRaven87/jump1_zps7d0770a5.png
http://i282.photobucket.com/albums/kk248/ZeroRaven87/jump2_zps71322a68.png

Best Answer

  • muoch10muoch10 Posts: 112
    Accepted Answer
    I'm not sure if this will fix your problem... but when ever I have issues with jumping I always do this:


    instead of using accelerate to jump use a change attribute like so:

    Change Attribute:
    self.Motion.Linear.Y to 500

    Obviously change the "500" to whatever speed you want...


    and for the right/left movement change that to:

    for right:
    change attribute
    self.Motion.Linear.X to 500

    for left:
    change attribute
    self.Motion.Linear.X to -500


    and by doing this you don't need to set up a separate mechanic for jump + right movements... The right/left movement will work even when you're jumping...

Answers

  • ZeroRavenZeroRaven Member Posts: 33
    well im trying a different approach using Jamie_c's tutorials, im fiddling with a "
    change velocity" attribute.

    My only concern with your setup is it still requires a collision check for the walking animations for moving while colliding with the platforms.
Sign In or Register to comment.