Multiple Jumpattacks Possible?

maxman

Well-known member
Now I wonder if it's possible if I can make a character do the jumpattack more than once.
 
maybe use script to force anim change at the end of the first jump attack, or maybe just use cancel in jumpattack or in it's landing anim.  The second jumpattack would be in a new anim.

use this animation script for changing anim
Code:
void anichange(void Ani)
{// Animation changer
    void self = getlocalvar("self");

    changeentityproperty(self, "animation", openborconstant(Ani)); //Change the animation
}

 
One non script way is to set cancel in jumpattack to cancel to freespecial which is practically clone of that jumpattack. Another cancel is set in that freespecial to cancel to another freespecial with same frames.

Since these 3 animations are same, the result is you have the ability to perform jumpattack multiple times by tapping attack button during jump and jumpattack.
 
Bloodbane is right, but there IS another way that doesn't use script. If your character has multiple jumpattacks (like jumpattack2), then they can cycle through them. A character with jumpattack and jumpattack2 can attack infinitely in the air as long as the player presses Attack and Down+Attack. But that's a little inconvenient...

I use the cancel-freespecial method in a lot of my mods. Here's a snippet of the jumpattack cycle from ClaFan:

anim jumpattack
cancel 2 3 1 a freespecial7
cancel 2 3 1 a2 freespecial9
jugglecost 1
delay 7
attack1 0
jumpframe 0 1.2 1
offset  45  54
bbox  40  33  11  20
frame data/chars/fighter/3a.png
sound data/sfx/sword.wav
attack1  34  31  33  17  10  0  0  0  10
dropv 1.2 1 0
frame data/chars/fighter/2b.png
Attack1  0
frame data/chars/fighter/2c.png
frame data/chars/fighter/2c.png

anim freespecial7
cancel 2 3 1 a freespecial8
cancel 2 3 1 a2 freespecial9
jugglecost 1
delay 7
jumpframe 0 1.2 1
attack1 0
offset  45  54
bbox  40  34  11  19
frame data/chars/fighter/2c.png
sound data/sfx/sword.wav
attack1  33  37  35  17  10  0  0  0  10
dropv 1.2 1 0
frame data/chars/fighter/3b.png
Attack1  0
frame data/chars/fighter/3c.png
frame data/chars/fighter/3c.png

anim freespecial8
cancel 2 3 1 a freespecial7
cancel 2 3 1 a2 freespecial9
jugglecost 1
delay 7
jumpframe 0 1.2 1
attack1 0
offset  45  54
bbox  40  33  11  20
frame data/chars/fighter/3a.png
sound data/sfx/sword.wav
attack1  34  31  33  17  10  0  0  0  10
dropv 1.2 1 0
frame data/chars/fighter/2b.png
Attack1  0
frame data/chars/fighter/2c.png
frame data/chars/fighter/2c.png

The relevant cancels are bolded for emphasis. The cycle begins with jumpattack, and then reaches an endless loop with freespecial7 and freespecial8. I personally like to set it so that the cycle only continues as long as you hit the enemy; because otherwise, the player would slowly float to the heavens as long as you mashed Attack1.

Also worth mentioning: put a jumpframe with a reasonable value in the freespecials Otherwise, the player will just fall straight down like a rock. For a game like ClaFan with small sprites, a jumpframe with 1.2 and 1 is sufficient enough to chase after the enemy once it's hit.
 
So, when you use cancel for freespecial, maybe it would be possible to punch in air more than once while you're in jumpattack mode. So you start with jump, then jumpattack (using cancel), freespecial#, until it ends. It must be a matter of keys and probably commanding animation like mostly freespecial. I'd like to make a character repeat his punches in air after he does his jumpattack. So cancel must be the answer, eh?
 
I mentioned cancel too, thou you guys explained it much better ;)


@vyck
the script I posted needs to be added to a file under data/scripts - eg. script.c (or you can add it to an existing script).  BTW I diddn't write this script either.

add script to char header, eg. -
animationscript data/chras/script.c

the command is eg.
@cmd anichange "ANI_FOLLOW2"

I was going to try and make a simple 'How to use scripts' that simply shows where to put them, referencing them in chars, using commands and combining scripts.  It would need some input from proper scripters thou.

Eventually I'd like to see some kind of script database, firstly with all the small/simple scripts.
Then eventually add more intermediate and advanced ones.  Thou I could do a lot of the compiling of this info, I would need to pick the brain of script makers to have scripts usage be explained.
 
Ah! Ok. It's an animation script.
A database would be an excellent idea. I tried to get something similar going, but I just didn't know enough about it. Afraid of making myself look like an idiot.
Do you have an outline in mind? We can experiment with a format on OBM, bring the finished product here.





 
You're cut + paste script database is part of the inspiration, thou I thinking of an actual archive of files and documentation to go with it,  like a .CHM/HTML help file (also PDF)

One part of it is too have ready made/ready to go scripts for anyone to use in an archive.  A document would be included showing the commands/functions, pretty much Bloodbane did with his scripts pack.

The second more important one would be the scripts index document.  So if you looked up/clicked anichange you would see this.

void anichange(void Ani)
{// Animation changer
    void self = getlocalvar("self");

    changeentityproperty(self, "animation", openborconstant(Ani)); //Change the animation
}

if you looked up block you'd get this (this is just an example, there would be more than one script related to block)
void block(int Flag)
{// Turns blocking status
    void self = getlocalvar("self");
    changeentityproperty(self, "aiflag", "blocking", Flag);
}



The other part of it is showing people how to combine scripts, so they can make a custom script containing just what they need/want. There'd be more that would need explanation, but basically for small scripts, eg if you want both of these scripts into one script, it would be like this.

void anichange(void Ani)
{// Animation changer
    void self = getlocalvar("self");

    changeentityproperty(self, "animation", openborconstant(Ani)); //Change the animation
}

void block(int Flag)
{// Turns blocking status
    void self = getlocalvar("self");
    changeentityproperty(self, "aiflag", "blocking", Flag);
}

in a single file - example script.c

Eventually all these little scripts get indexed in the help file, more advanced ones can have their own sections  (like using slam script or weapons script). 

Anyhow instead of explaining I'll but the basic idea together and see what people think.  I've got the help file made now with all the tutorials and updated manual combined, just need some more work before I can release it. 

edit: in the long run it would have to be a community effort, the idea thou is we could get a lot done ourselves and get input from devs/scripters without bothering them too much.
 
Back
Top Bottom