Help with stopping actor and facing directions

cBrookscBrooks Member, PRO Posts: 40
Hello all, I am new-ish to game salad so please make your answers easy to understand. I am finally making my first app that I am going to publish and I got stuck along the way. I have 2 questions:

1: I have set my actor to accelerate to move which looks ALOT better than just move, but I have encountered a problem. When I stop hitting the movement key my actor keeps on sliding in the direction he was going. Is there any way to make him immediately stop when I let go of the key? -Please don't mention 'switch to just move' because my whole game won't work if I do.

2: I have an animation that when my character isn't doing anything he just scratches his head and looks around. There is a right direction animation and the same animation but in left direction. I want it so when you walk right then let go of the key you get the right animation, and when you walk left and let go of the key you get the left animation. I cant figure out how to do that, I can only do when you walk right and let go of the key you get the right animation and when you walk left and let go of the key you still get the right animation, which looks all messed up. Any help would be greatly appreciated.

Cheers

Comments

  • PaxPaxPaxPax Member Posts: 106
    For the accelerate 'stop' issue you can create a boolean attribute, I will call it 'trigger''. When your 'movement key' is pressed, change 'trigger' attribute to True and put in your accelerate rule. Then to stop, when 'movement key' is released, change 'trigger' attribute to False and constrain Actor self motion linear velocity to 0.

    Not sure if this is the best way to do it. I am also a newbie and this is how I do it.

    cheers
  • cBrookscBrooks Member, PRO Posts: 40
    Oh thank you so much PaxPax I have figured out my other question but you helped me sooooo much!

  • PaxPaxPaxPax Member Posts: 106
    You are most welcome. Glad It worked for you.

    cheers
Sign In or Register to comment.