How do I get a shadow to follow appropriately while jumping

Get help using Construct 2

Post » Fri Dec 19, 2014 5:28 pm

I'm working on a top-down RPG and want to include jumping. Any tips?

-I have a synthetic jump command that works well to get the character with 1 pixel of the initial Y position of the jump, but I could use help with the equation for positioning the shadow so that it follows your character at the right position "on the ground."

There’s probably an easier way to do it, but here are the instance variables that I am currently using:

IsJumping variable: 0 for on the ground, 1 for jumping, initial set to 0
InitialVelocity: sets the strength of the jump, initial set to 0
Gravity: every 0.016 seconds, add 0.04 to Gravity, initial set to 0 
VectorY: InitialVelocity-Gravity

...and sequence on the event sheet:

-Press space bar:
set initial velocity to 1,
set IsJumping to 1

-IsJumping = 1:
Set CharacterY to Character.Y+Character.VectorY

-Gravity is > 2*InitialVelocity
Wait 0.032 seconds (Got this number from some trial and error, but I guess it might be taking the sequence of the ticks into account)
Set IsJumping to 0
Set Gravity to 0
Set Character.Y to Character.Y
Posts: 1
Reputation: 177

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests