Stop Jump to Dive, with an Increasing velocity. Please Help...

Hello all,

I've run into a problem where I am trying to have my character at a constant movement, and when i press the up key it jumps, and when i press the down key, it stops the jump in mid movement, and dives down.

I have the basic concept of this done, however, every time i press the down button i would like it to continue to go down at a faster rate than before. But instead if I pressed the down key, it interrupts the gravity pull and ends up moving slower.

The way i currently have my game set-up for the "coding" is this:

Gravity Control - accelerate in direction 270, relative to: scene with an acceleration of 300

Jump Control - Receives a key press "Up" is: Down ; Do> Set: Self.motion.linearVelocity.y to 250

Dive Control - Receives a key press "Down" is: Down ; Do> Set: Self.motion.linearVelocity.y to -250


I've attempted to use the "Move" behavior, "Accelerate Towards" and mess with the numbers.... but it remains at a constant.
--------------------------------------------------------------------------------------------


Also, Here is how my constant movement control is working.

if game.GameOver is False
if game.PlayerRun is False

Do;

set: self.position.x to:
set: self.position.y to:

Timer:

After 3 seconds (run to completion)

Interpolate: self.position.x to: 120 for 1 second using linear function.

where do declare the statements "game.GameOver," and "game.PlayerRun?" I've made them into Booleans and have the GameOver check box checked, but I'm not sure where I declare how they work or even how to tell the engine what they are used for...


Thank you for the help, this has been giving me a lot of trouble.

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited February 2014
    I think interpolate is your problem try doing the movement with a timer every 0 seconds change motion linear velocity x to 200 to test.

    Move and interpolate will probably ignore your jump and dive rules so I would use motion linear for all controls.

    Darren.
  • JiggleboxJigglebox Member Posts: 63
    That worked in order for me to get the Jumps and Moving forward, however, I'm still running into the issue of having my "Dive" key slowing down the fall.... I'm trying to figure out a better way to explain it...

    currently if I press the Down arrow, the first press makes me change direction and go down after a jump in mid air. However, if I press it again, it resets the descent speed so instead of again increasing the speed of falling, or just traveling a short distance and continuing the fall, it slows the speed of falling by resetting it to the speed that I have the Down arrow key set to...
Sign In or Register to comment.