8 Directional Jump Movement
Author: | pr0
|
Submitted: | 31st July, 2003
|
Views: | 5997
| Rated: |
|
|
Let's face it, sometimes the regular 8 directional just won't cut it! There is no jump which makes the movement very cheap. I will demonstrate here how to accomplish a fully customized 8 directional movement with jump.
The key to making an 8 directional jump is to use a bottom collider to determine when to stop the jump. A shadow will come in handy right now. Not only will you make an 8 dir jump, but you will have a nice shadow to go with it.
CREATING THIS MOVEMENT:
1 -> Create a main character
2 -> Create a circular under shadow
3 -> Place the shadow under your characters feet
4 -> Add the following events:
->Repeat while Up Arrow is pressed
->Set Y( Character ) - 2
->Set Y( Shadow) - 2
->Repeat while Down Arrow is pressed
->Set Y( Character ) + 2
->Set Y( Shadow) + 2
->Repeat while Left Arrow is pressed
->Set X( Character ) - 2
->Set X( Shadow) - 2
->Repeat while Right Arrow is pressed
->Set X( Character ) + 2
->Set X( Shadow) + 2
->Upon Pressing Shift + Flag 0 ( Character ) is off
->Set Flag 0 ( Character ) to on
->Is a flag on? Flag 0 ( Character )
->Set Y( Character ) - 5 + Value A( Character )
->Is a flag on? Flag 0 ( Character ) + Every .10 sec
->Add 1 to Alterable Value A ( Character )
->Character collides with the shadow?
->Set Alterable Value A ( Character ) to 0
->Set Flag 0 ( Character ) off
Run the game and there you go! A perfect jumping movement with 8 directions!
Download this example:
http://www3.telus.net/tmac/skyllz-8dir.zip
Screenshot:
http://www3.telus.net/tmac/8dir.jpg
|
|
pr0
Registered 26/02/2003
Points 1375
|