The Daily Click ::. Forums ::. Klik Coding Help ::. Forward Thrust?

Post Reply  Post Oekaki 

Posted By Message


Drum and Bass Fueled Psycho


VIP MemberCardboard BoxThe Cake is a Lie
22nd December, 2008 at 05:19:17 -

I just need help on how to get and active object jump Thrust Forward after pressing the Jump button, or button 1.
My code so far:

Pressed fire 1
+Value R = 0
-Set Value R to 1

Now for the forward thrust.

Pressed fire 1
+ Value R = 1

That's my road block. How would I get My active to do a forward thrust? (Take Sonic 3 and Knuckles for example. When sonic picks up a fire sheild he goes forward when you press the jump button twice. This is the effect I'm trying to get.)



Evil Faker

22nd December, 2008 at 14:07:16 -

Use an alterable value.

Pressed fire 1
+ Value R = 1
- Set alterable value A to 10 (or another unused value)

Alterable value A > 0
+ character is facing right
- Set X position to X("Character") + 2
- Subtract 1 from Alterable value A

then for facing left do -2 instead of +2

This will make it jump 20 pixels in total, not that far so you may want to increase it so it moves by more than 2 at a time, or increasing alterable value A.
Changing A will change the length of thrust
Changing the X jump will change the speed of thrust

Edited by Joe.H

My signature is never too big!!!



VIP MemberThe Cake is a Lie
22nd December, 2008 at 22:05:05 -

Or for a kind of boosty speed effect, you could use Joe.H's method but say:

. Alterable Value A > 0
+ character is facing right
-Set X position to X("Character") + Alterable Value A
-Subtract 1 from Alterable Value A

Then the character will woosh forward suddenly but gradually decellerate. Just repeat the same for facing left, but change "+ Alterable Value A" to "- Alterable Value A"

n/a ...

Post Reply



Worth A Click