R
Rayzero-x
Guest
ok i would like to know how to make in enemy move backwards after you hit them? and i would like to know how to float in the air for just a few seconds (not going up)
sparkshocker said:well i don't mean push them back with a basic attack i mean push them back with a certain attack like a freespecial, is it scripted?.
Bloodbane said:As for float in air, a script is needed for this, here's an example:
@script
void vSelf = getlocalvar("self");
if(frame==1){
int iTime = openborvariant("elapsed_time");
changeentityproperty(vSelf, "tosstime", iTime + 400);
}
@end_script
If set in an animation, entity will float in for 2 seconds at 2nd frame. You won't see the effect unless entity is in air when this script is run.
NickyP said:sparkshocker said:well i don't mean push them back with a basic attack i mean push them back with a certain attack like a freespecial, is it scripted?.
It can be with any attacking animation, and it's not scripted. Remember how to set up an attackbox, right? Like, attack # # # # etc? Well if you change it to something likeattack3 # # # #, then if the enemy has anim pain3, the enemy will play that pain animation instead of the standard one.
Then in the enemies pain animation, use move -#, where # is the amount of pixels they will move back per frame.
anim pain3
loop 0
delay 20
bbox 30 30 50 50
@cmd changeentityproperty getlocalvar("self") "xdir" -#
frame data/chars/foo/pain3-1.png
frame data/chars/foo/pain3-2.png
frame data/chars/foo/pain3-3.png
If so, will they retain aerial velocity and float upwards as the player attacks; or will they float in place and just receive damage?
BeasTie said:@bWWd - I agree, it makes sense to have something like this.
Bloodbane said:@Plombo: Don't you think jumpframe is enough?
Anyways, script Plombo posted is great combined with jumpframe to stop enemy if you want enemy to stop before PAIN animation ends.
I agree about move command. It's best used for teleport actions.