Author Topic: Reduce Fall Velocity  (Read 2586 times)

jason878

  • Visitor
  • *
  • Posts: 1
    • View Profile
Reduce Fall Velocity
« on: 2014-11-30, 09:02:13 PM »
I'm pretty new to SGDK2.2 and need a bit of help getting started on a gravity-based sidescroller.
If anyone can answer either of these questions I'd be extremely grateful

1. I figured out how to reduce the jump height using AlterYVelocity, but not how to increase it. How would I make the sprite jump 1.5 - 2X as high as normal?
2. How do I reduce or increase fall speed?

I'm building off of the default project, if that's any help to anyone

Thanks in advance for any help

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2736
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Reduce Fall Velocity
« Reply #1 on: 2014-11-30, 09:19:37 PM »
Unfortunately since I'm on vacation I don't have the best facilities to answer your question, but hopefully I can give you a good clue. AlterYVelocity is a key piece. But if you're adding a new rule to a sprite that already exhibits gravity, you might be going about it in the wrong way. You should find an already-existing rule that calls AlterYVelocity, and then you should be able to adjust its parameter either higher or lower to affect jump height. Alternatively you could find a rule (it might be called Jump) that sets the dy property of the sprite, which determines how hard the sprite jumps when a jump starts. You could also adjust that in either direction.