maxman
Well-known member
I see references from @Bloodbane's Avengers Template and floater script, as well as @DCurrent's paus0001 script, for a time limit on a looped animation. The entity's animation loops while it's on air. It's like Magneto's flying mode from X-Men VS Street Fighter where you can do any air attack until time expires, and he drops himself off to the ground.
With this looped animation as an example and it also has floater for floating.
I tried no loop on the same animation but with same frames for better movement, but every time I do one of the attacks, I used an animation script to revert back to the same animation without changing to a certain frame. What I'm trying to do is to sync within time limit to fit the rhythm of having a time limit like flying characters with air attacks like Magneto.
I want to give a time limit similar to the way paus0001 does. However, I have no clue how to emulate the way the time value for freezing works.
Let's say, for example, I have Iron Man floating with his looping animation. I can move using keymove and keyflip, and floater makes him remain on air. However, I need something that gives time value like paus0001 for remaining on air without floating forever. It's kinda like @cmd norun 1 which is at the last frame of anim run when it loops. You keep running until it stops. I'd like to do air attacks before time expires. I don't wanna keep doing air attacks forever while the animation is looping after being reverted. How can I get that to do air attacks within a certain time limit while the floating animation loops?
With this looped animation as an example and it also has floater for floating.
Code:
anim follow1
loop 1
delay 1
offset 66 135
bbox 44 44 30 74
frame data/chars/Ironman/j0.gif
delay 8
@cmd keyflip 0
@cmd keymove 1.2 0.6
@cmd floater 49
frame data/chars/Ironman/j0.gif
frame data/chars/Ironman/j1.gif
frame data/chars/Ironman/j0.gif
@cmd keyflip 0
@cmd keymove 1.2 0.6
frame data/chars/Ironman/j1.gif
frame data/chars/Ironman/j0.gif
@cmd keyflip 0
@cmd keymove 1.2 0.6
frame data/chars/Ironman/j1.gif
I tried no loop on the same animation but with same frames for better movement, but every time I do one of the attacks, I used an animation script to revert back to the same animation without changing to a certain frame. What I'm trying to do is to sync within time limit to fit the rhythm of having a time limit like flying characters with air attacks like Magneto.
I want to give a time limit similar to the way paus0001 does. However, I have no clue how to emulate the way the time value for freezing works.
C:
void paus0001(int iToggle, int iTime){
/*
paus0001
Damon Vaughn Caskey
11022009
Pause or unpause action for all entities except self.
*/
void vSelf = getlocalvar("self"); //Caller
int iETime = openborvariant("elapsed_time"); //Current time.
int iMax = openborvariant("ent_max"); //Entity count.
int iEntity; //Loop counter.
void vEntity; //Target entity.
for(iEntity=0; iEntity<iMax; iEntity++)
{
vEntity = getentity(iEntity); //Get target entity from current loop.
if (vEntity != vSelf) //Not Self?
{
changeentityproperty(vEntity, "frozen", iToggle); //Toggle frozen.
changeentityproperty(vEntity, "freezetime", iETime + iTime); //Toggle frozen time.
}
}
}
Code:
anim follow20 #SHINKU HADOKEN
offset 97 177
delay 8
bbox 78 82 44 96
@cmd stop
@cmd setindexedvar "fightStarted" 1
@cmd paus0001 1 200
frame data/CHARS/ARyu/shnhdk01.png
frame data/CHARS/ARyu/shnhdk02.png
sound data/sounds/ryu/shinku.wav
frame data/CHARS/ARyu/shnhdk03.png
delay 70
frame data/CHARS/ARyu/shnhdk04.png
delay 8
sound data/sounds/ryu/hadoken.wav
bbox 80 86 63 92
frame data/CHARS/ARyu/shnhdk05.png
bbox 86 91 65 88
@cmd spawnAndThrow "shinhado" 80 0 70 0.9 NULL() NULL()
frame data/CHARS/ARyu/shnhdk06.png
frame data/CHARS/ARyu/shnhdk07.png
frame data/CHARS/ARyu/shnhdk08.png
frame data/CHARS/ARyu/shnhdk09.png
bbox 86 89 60 90
frame data/CHARS/ARyu/shnhdk10.png
bbox 86 86 56 93
frame data/CHARS/ARyu/shnhdk11.png
bbox 86 81 51 97
frame data/CHARS/ARyu/shnhdk12.png
bbox 80 79 39 99
frame data/CHARS/ARyu/shnhdk13.png
frame data/CHARS/ARyu/shnhdk14.png
Let's say, for example, I have Iron Man floating with his looping animation. I can move using keymove and keyflip, and floater makes him remain on air. However, I need something that gives time value like paus0001 for remaining on air without floating forever. It's kinda like @cmd norun 1 which is at the last frame of anim run when it loops. You keep running until it stops. I'd like to do air attacks before time expires. I don't wanna keep doing air attacks forever while the animation is looping after being reverted. How can I get that to do air attacks within a certain time limit while the floating animation loops?
