AlexDC22
Well-known member
so i needed a script to achieve this since i couldnt get it working the normal way.
the problem was that is a freespecial with a follow... and in the past it was working ok without a script but looked wonky AF, and now since ive added
dust fall land jump, this specific attack needed jumpframe and landframe to display the dust land.. in the past the was no need for them.
first video show it it was in the past and second how it is now... issue am having is that in the past the air hits where slower as the character would hover in the air till they where done... now tho with the additiong of jumpframe i cant seem to do that, while all the hits land , theyre rather fast now and am not sure which i like more..old and slow and or new and fast... in any case i cant get the new way to slow down but at least it shows the dust land animation...
thought on how to fix and or should i bother as it still functions albeit faster?
thanks
OLD WAY
NEW WAY
character animation
Script for it... i import it to player.c script which every player uses
the problem was that is a freespecial with a follow... and in the past it was working ok without a script but looked wonky AF, and now since ive added
dust fall land jump, this specific attack needed jumpframe and landframe to display the dust land.. in the past the was no need for them.
first video show it it was in the past and second how it is now... issue am having is that in the past the air hits where slower as the character would hover in the air till they where done... now tho with the additiong of jumpframe i cant seem to do that, while all the hits land , theyre rather fast now and am not sure which i like more..old and slow and or new and fast... in any case i cant get the new way to slow down but at least it shows the dust land animation...
thought on how to fix and or should i bother as it still functions albeit faster?
thanks
OLD WAY
Code:
######################################################################
## FreeSpecial 3 & Follow 2 Animation ##
########################################
anim freespecial3
loop 0
delay 5
jumpframe 1
landframe 9 land
followanim 2
followcond 4
fastattack 1
sound data/sounds/makiairk.wav
offset 27 112
attack 999 999 1 1 1 0 0 0 0 0
move 5
bbox 10 16 26 71
frame data/chars/maki/jump1.png
attack 0 0 0 0 0 0 0 0 0 0
offset 30 127
bbox 14 24 20 82
frame data/chars/maki/jump2.png
offset 33 126
bbox 16 24 24 70
frame data/chars/maki/jump3.png
bbox 0 0 0 0
offset 37 130
frame data/chars/maki/free21.png
offset 38 142
frame data/chars/maki/free22.png
offset 40 142
frame data/chars/maki/free23.png
offset 51 151
move 0
@cmd followatk "ANI_FOLLOW2"
attack 30 49 95 21 8
frame data/chars/maki/free24.png
@cmd followatk "ANI_FOLLOW2"
offset 56 139
frame data/chars/maki/free25.png
offset 51 129
delay -1000
frame data/chars/maki/free26.png
offset 49 132
delay 5
attack 0 0 0 0 0
frame data/chars/maki/free27.png
anim follow2
delay 5
bbox 0 0 0 0
landframe 13 land
fastattack 1
energycost 12
sound data/sounds/makispec.wav
offset 41 138
frame data/chars/maki/free28.png
offset 34 134
attack 17 27 61 67 5
frame data/chars/maki/free29.png
offset 29 146
frame data/chars/maki/free30.png
offset 29 147
attack 0 0 0 0 0
frame data/chars/maki/free31.png
offset 35 139
frame data/chars/maki/free32.png
offset 35 135
frame data/chars/maki/ver1.png
offset 35 142
attack 21 6 52 102 5
frame data/chars/maki/ver2.png
offset 33 146
frame data/chars/maki/ver3.png
offset 33 148
attack 0 0 0 0 0
frame data/chars/maki/ver4.png
offset 33 146
frame data/chars/maki/ver5.png
offset 34 151
frame data/chars/maki/ver6.png
offset 43 152
frame data/chars/maki/free33.png
offset 42 155
delay -1000
frame data/chars/maki/free34.png
offset 33 160
delay 5
frame data/chars/maki/free35.png
offset 28 141
delay 5
attack 8 38 85 63 10 1
frame data/chars/maki/free36.png
offset 24 144
attack 0 0 0 0 0 0
frame data/chars/maki/free37.png
C:
// Define the follow attack function
void followatk(char next_anim)
{
// Get the current entity
void self = getlocalvar("self");
// Get the number of hits the current animation has registered
int hits = getentityproperty(self, "animhits");
// If there has been at least one hit, switch to the next animation
if (hits >= 1)
{
performattack(self, openborconstant(next_anim), 1);
}
}
void main()
{
// Set the current entity
void self = getlocalvar("self");
// Example condition to trigger the follow attack
if (getentityproperty(self, "animationid") == openborconstant("ANI_FREESPECIAL3"))
{
// Call followatk with the desired animation name
followatk("ANI_FOLLOW2");
}
}