you already know how to use spawnframe to spawn a custom entity. rather then having one entity with 22 freespecials why not have 22 different enemies with names relative to their attacks that way you can control who to spawn for what attack.
Just to elaborate - don't try to get cute with optimizing. The engine already does most of this for you. One example is cutting sprites. Don't try to cut sprites individually like you would for Mugen. OpenBOR does this automatically on load, so all you'll accomplish is wasting your own time.There is no way to do that but if you reference the same sprites for 2 moves the sprites will only be loaded once.
I created a new skill with the same sprites and loaded, everything is working fine except the skill animation remains on the screen and never disappears, in addition, the attackbox keeps on attacking the enemies that get inside its range.There is no way to do that but if you reference the same sprites for 2 moves the sprites will only be loaded once.
Add this to the last line of animation
@cmd killentity getlocalvar("self")
anim freespecial5
@cmd costsp 5 "ANI_freespecial9"
@cmd shadow 5 20 120 6 2 255 0 255 # Magenta
landframe 1
loop 0
offset 476 354
bbox 0 0 0 0
spawnframe 1 360 0 -780 0 #spawnframe {frame} {x}{z}{y}{relative}
subentity SuperPower_G_SP
delay 5
frame data/chars/players/Ty/land01.gif
delay 10
frame data/chars/players/Ty/stance01.gif
frame data/chars/players/Ty/stance02.gif
frame data/chars/players/Ty/stance03.gif
frame data/chars/players/Ty/stance04.gif
frame data/chars/players/Ty/stance05.gif
frame data/chars/players/Ty/stance06.gif
delay 20
frame data/chars/players/Ty/stance06.gif
delay 5
frame data/chars/players/Ty/stance05.gif
frame data/chars/players/Ty/stance04.gif
frame data/chars/players/Ty/stance03.gif
delay 10
frame data/chars/players/Ty/land01.gif
name SuperPower_G_SP
health 1
nolife 1
type npc
hostile enemy npc obstacle shot
candamage enemy npc obstacle shot
speed 0
remove 0
nomove 1
noquake 1
falldie 2
subtype flydie
gfxshadow 1 3
flash flash
bflash guard
dust dust
palette data/chars/players/Vice/throwforward05.gif #1
anim idle
hitflash hitspark
hitfx data/sounds/beat3.wav
fastattack 1
attackone 0
loop 0
bbox 0 0 0 0
offset 476 354
delay 3
frame data/chars/players/Vice/throwforward01.gif
frame data/chars/players/Vice/throwforward02.gif
frame data/chars/players/Vice/throwforward03.gif
attack12 193 45 615 479 0 1 100 1 30 30
dropv 2 1
delay 5
frame data/chars/players/Vice/throwforward04.gif
frame data/chars/players/Vice/throwforward05.gif
frame data/chars/players/Vice/throwforward06.gif
frame data/chars/players/Vice/throwforward07.gif
frame data/chars/players/Vice/throwforward08.gif
@cmd projectile 1 "SuperPower_G" 0 0 0
@cmd projectile 1 "dust03" 0 0 0
frame data/chars/players/Vice/throwforward09.gif
delay 10
frame data/chars/players/Vice/throwforward09.gif
@cmd killentity getlocalvar("self")
that works! thank you so much!You need to have a frame after any @cmd command for them to work.
frame data/chars/players/Vice/throwforward09.gif
@cmd killentity getlocalvar("self")
frame none #adding this line will fix it.
//KEYSCRIPTS
void ani = getentityproperty(self,"animationid");
if (ani == openborconstant("ANI_IDLE") || ani == openborconstant("ANI_WALK") || ani == openborconstant("ANI_ATTACK1") )
{// these are the animations that can be canceled
sp_atk("freespecial10",3,"a3"); //if you press forward and attack when you have 10SP or more perform freespecial
//KEYSCRIPTS
sp_atk("freespecial10",3,"a3"); //if you press forward and attack when you have 10SP or more perform freespecial
Cool I did that, there's a few situations I dont want it to trigger, is there a way to do IF NOT?Yes just remove the if conditions.
C-like://KEYSCRIPTS sp_atk("freespecial10",3,"a3"); //if you press forward and attack when you have 10SP or more perform freespecial
But if using in a keyscript file then you can cancel any animation even cutscene, death, falling or even grapples. So it could break your game so be careful.
Cool I did that, there's a few situations I dont want it to trigger, is there a way to do IF NOT?
if (ani != openborconstant("ANI_IDLE"))
{
// Do this if the animation is NOT idle.
}
int my_int = 0;
if (!my_int)
{
// Do this if my_int is 0 or has no value at all (like NULL).
}