Alebrain´s DR Punch Special Move Engine
Author: | RapidFlash
|
Submitted: | 28th July, 2002
|
Views: | 5541
| Rated: |
|
|
So far, I haven´t seen a special moves in klik (maybe there´s one I missed), so after thinking about it, I´ve finally come up with a special move engine that should theoretically work (I don´t have MMF, TGF, K&P with me... on vacation. So please do tell me if it works.). Oh, and if you use this engine, please put me in the credits under Thanks and/or coding.
SPECIAL MOVES
Let´s pretend we have an active object named Char with three special moves that are Left Left Punch, Down Right Punch, and Down Right Kick...
#1 The first thing we do is to link the key movements to Char´s alterable values, e.g:
Joystick1 presses Dowm -------------- Add “D” to Alterable Value A (of Char´s)
Joystick1 presses Fire2 ---------------- Add “P” to Alterable Value A (of Char´s)
And so on and so on... in this example, Left = L, Right = R, Up = U, Fire1 = K
#2: Now we make sure when, say, Down Right Punch is used, that he pulls of his special move, a fireball...
Now there´s two ways to do the fireball: #1, make him shoot the fireball, using
Alterable Value A of (Char) = “DRP” Shoot object Fireball at Speed X
Set Alterable Value A of (Char) = “”
The second way (in my opinion, better and less buggy) is to make the fireball object have a path and when Down Right Punch is pressed... here we would do:
Alterable Value A of (Char) = “DRP” Create oject (Fireball) (0,0 from Char)
Set Alterable Value A of (Char) = “”
Tip: Make sure you set the x/y co-ordinates are linked to the Action Point
#3: Now the hard and complicated part: Resetting the Alterable Values when it won´t link to the moves... what we would do is:
Value A of (Char) >< “L”
Value A of (Char) >< “LL”
Value A of (Char) >< “LLP”
Value A of (Char) >< “D” --------- Set Alterable Value A of (Char) = “”
Value A of (Char) >< “DR”
Value A of (Char) >< “DRP”
Value A of (Char) >< “DRK”
#4: The debugging part... to make sure the player can´t move while doing the special move, do:
User Animation 1 is playing Ignore Control (Player1)
User Animation 1 finished Restore Control (Player1)
The next one, to make sure he can´t do it in the air, would be to do:
Y Position of (Char) >< (normal y position) Set Alterable Value A of (Char) = “”
Value A of (Char) = “DRP”
Well, I´m finished with this... please tell me if this works, and if it doesnt´t, explain the problem, I´ll try to figure it out. Remember, use “When key is pressed”, not “While key is pressed”, or you may end up with a value that is “DDDDDRRRP”
Klik out.
|
|
RapidFlashSavior of the Universe Registered 14/05/2002
Points 2712
|