Bruce
Active member
Hello everyone,
As far as performance or/and memory usage,
which method is better?
1. Create an additional animation within the same entity and use the script below to call out the animation:
Fireball:
or
2. Create a 2nd Entity and declare it on the model:
I like the first method, but I want to make sure it does not hurt the performance or/and memory usage,
Thank you so much
As far as performance or/and memory usage,
which method is better?
1. Create an additional animation within the same entity and use the script below to call out the animation:
Code:
@cmd spawn01 "Fireball" 0 0 0 openborconstant("ANI_idle2")
Code:
void spawn01(void EntityName, float fX, float fY, float fZ, int AnimID)
{
...
...
if(AnimID != NULL()){performattack(vSpawn, AnimID);}
}
Fireball:
Code:
name Fireball
type none
gfxshadow 1 3
candamage enemy obstacle shot
anim idle
loop 1
followanim 1
followcond 1
hitflash flash
hitfx data/sounds/beat3.wav
attackone 1
fastattack 1
offset 55 40
bbox 0 0 0 0
delay 4
move 40
attack1 30 13 138 132 10 0 1 0 30 120
frame data/chars/Test/Fireball/idle01.png
frame data/chars/Test/Fireball/idle02.png
frame data/chars/Test/Fireball/idle03.png
frame data/chars/Test/Fireball/idle04.png
frame data/chars/Test/Fireball/idle05.png
frame data/chars/Test/Fireball/idle06.png
frame data/chars/Test/Fireball/idle07.png
frame data/chars/Test/Fireball/idle08.png
frame data/chars/Test/Fireball/idle09.png
@cmd NextSkill openborconstant("ANI_FOLLOW1")
frame data/chars/Test/Fireball/idle10.png
anim idle2
loop 1
followanim 1
followcond 1
hitflash flash
hitfx data/sounds/beat3.wav
attackone 1
fastattack 1
offset 55 40
bbox 0 0 0 0
delay 4
move 40
attack1 30 13 138 132 10 0 1 0 35 120
frame data/chars/Test/Fireball/idle201.png
frame data/chars/Test/Fireball/idle202.png
frame data/chars/Test/Fireball/idle203.png
frame data/chars/Test/Fireball/idle204.png
frame data/chars/Test/Fireball/idle205.png
frame data/chars/Test/Fireball/idle206.png
frame data/chars/Test/Fireball/idle207.png
frame data/chars/Test/Fireball/idle208.png
frame data/chars/Test/Fireball/idle209.png
@cmd NextSkill openborconstant("ANI_FOLLOW1")
frame data/chars/Test/Fireball/idle210.png
anim follow1
loop 0
attackone 0
hitflash flash
hitfx data/sounds/beat3.wav
offset 240 110
bbox 0 0 0 0
delay 3
move 40
frame data/chars/Test/Fireball/FB_BlowUp01.png
frame data/chars/Test/Fireball/FB_BlowUp02.png
frame data/chars/Test/Fireball/FB_BlowUp03.png
frame data/chars/Test/Fireball/FB_BlowUp04.png
frame data/chars/Test/Fireball/FB_BlowUp05.png
frame data/chars/Test/Fireball/FB_BlowUp06.png
frame data/chars/Test/Fireball/FB_BlowUp07.png
frame data/chars/Test/Fireball/FB_BlowUp08.png
frame data/chars/Test/Fireball/FB_BlowUp09.png
attack1 176 50 254 234 5 0 1 0 5 120
frame data/chars/Test/Fireball/FB_BlowUp10.png
delay 5
@cmd killentity getlocalvar("self")
frame data/chars/misc/empty.png
or
2. Create a 2nd Entity and declare it on the model:
Code:
name Fireball2
type none
gfxshadow 1 3
candamage enemy obstacle shot
anim idle
loop 1
followanim 1
followcond 1
hitflash flash
hitfx data/sounds/beat3.wav
attackone 1
fastattack 1
offset 55 40
bbox 0 0 0 0
delay 4
move 40
attack1 30 13 138 132 10 0 1 0 30 120
frame data/chars/Test/Fireball/idle201.png
frame data/chars/Test/Fireball/idle202.png
frame data/chars/Test/Fireball/idle203.png
frame data/chars/Test/Fireball/idle204.png
frame data/chars/Test/Fireball/idle205.png
frame data/chars/Test/Fireball/idle206.png
frame data/chars/Test/Fireball/idle207.png
frame data/chars/Test/Fireball/idle208.png
frame data/chars/Test/Fireball/idle209.png
@cmd NextSkill openborconstant("ANI_FOLLOW1")
frame data/chars/Test/Fireball/idle210.png
anim follow1
loop 0
attackone 0
hitflash flash
hitfx data/sounds/beat3.wav
offset 240 110
bbox 0 0 0 0
delay 3
move 40
frame data/chars/Test/Fireball/FB_BlowUp01.png
frame data/chars/Test/Fireball/FB_BlowUp02.png
frame data/chars/Test/Fireball/FB_BlowUp03.png
frame data/chars/Test/Fireball/FB_BlowUp04.png
frame data/chars/Test/Fireball/FB_BlowUp05.png
frame data/chars/Test/Fireball/FB_BlowUp06.png
frame data/chars/Test/Fireball/FB_BlowUp07.png
frame data/chars/Test/Fireball/FB_BlowUp08.png
frame data/chars/Test/Fireball/FB_BlowUp09.png
attack1 176 50 254 234 5 0 1 0 5 120
frame data/chars/Test/Fireball/FB_BlowUp10.png
delay 5
@cmd killentity getlocalvar("self")
frame data/chars/misc/empty.png
I like the first method, but I want to make sure it does not hurt the performance or/and memory usage,
Thank you so much