How to achieve constant upward speeds?

ggiersdorf

  • Posts: 52
Quick question about y movement speeds with push functions.  If on a actor set the spacebar to I use the Push (Sharply) towards x,y with x force command with I can get my character to move upwards. I have gravity on as well so it pulls it down when you don't tap spacebar however if you hit the space bar quickly in succession the actor seems to basically JUMP to the top of the screen. I want it to only go up -1 per press which I have set but it seems like it multiples when done fast.. I almost feel like it needs a timeout value or something..

I hope someone understand this and might have a way to fix this??


Photon

  • Posts: 2691
Are you saying you only want it to jump a certain height per press? If so, you might be better off just arbitrarily setting its y-speed to the same thing every time you press the button instead of using forces.
Do NOT PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!

SadiQ

  • Posts: 1795
If I'm not mistaken push will take it's force and add it to the forces that are already applied to a body, so if you don't want that effect you should probably use Set velocity instead.
As for the space bar getting hit quickly try this:
create a boolean and set it's value to true
if you press Space and your boolean is true
   set your boolean to false
   push your actor
   Do after .3 seconds
      set boolean to true.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.