burn anim (shared animation?)

NED

Well-known member
Hi,
I'm working on some obtacles, barels, drums, including exploding drums.
So I'll add burning pain sprites for all characters.

I'll use SF2 standard anims for these burn sprites.
Is it possible to use them as "shared animations)
Just one or 2 versions of it (small or big character)

When I started creation on player, I included various colors I'll need, but not the burning one.

So, can a particular anim use a different palette than the one used by entity.

Thanks
 
nedflandeurse, i recommend you make it with spawnbind script. If i understand you, all characters will have one same burn animation (except big enemies), so create an entity "Burn" that will have burn (or another fall) animation of burning character:

anim burn
loop 0
delay 10
offset 280 280
sound data/chars/enemy/fire.wav
frame data/chars/enemy/fire/f1.gif
frame data/chars/enemy/fire/f2.gif
frame data/chars/enemy/fire/f3.gif

and add the same animation to your character like next:

load Burn (or better make it know Burn in models.txt if it is one for all)
anim burn
        @cmd    spawnbind "Burn" 1 1 1
loop 0
delay 10
offset 280 280
sound data/chars/enemy/fire.wav
frame data/chars/enemy/fire/f1.gif
frame data/chars/enemy/fire/f2.gif
frame data/chars/enemy/fire/f3.gif

And this is the script:

void spawnbind(void Name, float dx, float dy, float dz)
{ // Spawn and bind other entity
  void self = getlocalvar("self");
  void Spawn;

  Spawn = spawn01(Name, dx, dy, 0);
  bindentity(Spawn, self, dx, dz, dy, 1, 6);
}

So with this when enemy will play burn animation there will Burn entity summon and repeat same animation. It will have it own palette (that can be edited in any time). The only thing you need is to match offsets, and after that put none instead of frames in the character burn animation. This is how i do it for my mod.
 
I have a different spawnbind, which works the same way - but you can control the bind and the direction too:

void spawnbind(void Name, float dx, float dy, float dz, int iDir,int iBind)
{ // Spawn and bind other entity
  void self = getlocalvar("self");
  void Spawn;

  Spawn = spawn01(Name, dx, dy, 0);
  bindentity(Spawn, self, dx, dz, dy, iDir, iBind);
}
 
Thanks, guys.
It's the best way to do it!

mtrain said:
and after that put none instead of frames in the character burn animation. This is how i do it for my mod.

But how can I destroy the spawned effect as soon as the player hits ground? (last frame of fall)
Also, if someone else make the player going to another anim, the flame effect have to disapear. But How?
 
But how can I destroy the spawned effect as soon as the player hits ground? (last frame of fall)
Also, if someone else make the player going to another anim, the flame effect have to disapear. But How?

hehehehe as a mugen coder, I know what you are thinking :)

Burn fx will be bind while the character is on his burn anim. Once it touches the ground, he will change his anim to another, and the bindentity will destroy the bind spawned entity, because the animation doesn't matches anymore.

bindentity(Spawn, self, dx, dz, dy, 1, 6);

Look at the last number then read this:

bindentity(entity, target, int x, int z, int a, int direction, int bindanimation)
~Bind entity to target, so the target moves, the entity moves.
~x, z, a: relative to target.
~direction: 0 no change 1 same direction as target -1 opposite direction as target 2 always right -2 always left
~bindanimation: 0 No effect. 1 Keep same animation as the target. 2 Also keep same frame as the target. 4 Kill the entity if the animation doesn't match.
~To unbind a entity, use bindentity(entity, NULL());
~Notice: You can combine those values for bindanimation, so it can be 6 which means 2 and 4.
 
This is exactly the reason why you should make plan first and then create spritesheets later and not opposite, because you will get missing colours problem when you would want to add some burning pain animations or freezing etc but its also best to have the colours for it in palette anyway so you dont have to be worried even if you dont use burn or freeze, you can also take burning sprites and change colours to the ones that are in characters palette but then your remaps might destroy burning sprites and change its colours.
  You could also try to force different palette only in burn animation which has all burning sprite colours.
  Simple command to force palette on some animations would solve problems like this and also would let us use basically infinite amount of colours if palette could be changed frame by frame and each frame would have different colours and completely different palette.
  There is also another way to create burning animation with drawmethod so you can tint character sprites red/orange/black and it looks quite ok, im using it in my rocko mod.
 
I do prefer the spawnbind option, so I can change the whole graphics and I can make the burn etity to spawn additional fx, like this:
FM1n6XI.png


It spawns some random flames from its body. Its a common touch in Mugen :)
 
@bWWd :
Yes, and we already talked about this  :-[
Perhaps I will destroy all my sprite / palette work and restart over it.

@Ilu :
It always feel more natural (to me) when I talk "mugen language" :P
I tried to apply it, but it make a crash.
Log file don't say particular info (can't compile script)

Burn anim:

Code:
anim	burn
      hitfx   data/sounds/indirect.wav
	quakeframe	1 1 -11
	loop	0
	landframe	2 dus
	forcedirection	1
	delay	15
	offset	96 177
	bbox	46 61 91 104
      @cmd    spawn01 "burned" 0 0 1
	@cmd bindentity Spawn self 0 2 0 1 4#6#--name X Z Y 1 4--
	attack	46 61 91 104 5 1 1 0 6 20
	frame	data/chars/mex/0.gif#empty
	bbox	38 84 124 73
	attack	38 84 124 73 5 1 1 0 6 20
	delay	300
	frame	data/chars/mex/0.gif#empty
	delay	40
	bbox	36 132 139 54
	attack	0 0 0 0
	frame	data/chars/mex/fall4.gif
 
I used that trick with bind in burn animation too

anim burn
loop 0
        quakeframe  0  1  -4
offset 96 202
delay  30
@script
if(frame==0)
{
    void self = getlocalvar("self");
    void e;

    clearspawnentry();
    setspawnentry("name", "eburn3");
    e = spawn();
    bindentity(e, self,0,1,0,1,1);
}
@end_script
frame data/chars/misc/0empty.gif
        sound  data/chars/en4/fall.wav
frame data/chars/misc/0empty.gif
delay  40
bbox 0 0  0  0
frame data/chars/en4/fall4.gif


But i dont recommend it cause it doesnt react properly to pause in attacks when you get hit.
I would instead try to use drawmethod tintmode to change colour of sprites like they do in snk KOF games.

anim bpain
loop 0
delay 2
offset 139 234
bbox 120 153 48 83
quakeframe 1 1 -8
@script
                void self = getlocalvar("self");
if ((getentityproperty(self, "direction")==1)&&(frame == 0)){
changeentityproperty(self, "velocity", -5, 0, 0);
}
if ((getentityproperty(self, "direction")==0)&&(frame == 0)){
changeentityproperty(self, "velocity", 5, 0, 0);
}
if(frame == 5){
void self = getlocalvar("self");
changeentityproperty(self, "velocity", 0, 0, 0);
}
@end_script
drawmethod tintmode 4
drawmethod tintcolor 200_50_0
sound data/chars/rocko/pain.wav
frame data/chars/rocko/gpain1.gif
frame data/chars/rocko/gpain2.gif
frame data/chars/rocko/gpain3.gif
delay 5
frame data/chars/rocko/gpain5.gif
frame data/chars/rocko/gpain4.gif
frame data/chars/rocko/gpain5.gif
frame data/chars/rocko/gpain4.gif
frame data/chars/rocko/gpain3.gif
delay 3
frame data/chars/rocko/gpain2.gif
sound data/sounds/step2.wav
frame data/chars/rocko/gpain1.gif
 
But i dont recommend it cause it doesnt react properly to pause in attacks when you get hit.

This is what making the flash bug I mentioned! Thanks Bwwd.
Now I need to figure a new way to archive this.

confirmed: its the bindscript who is causing this

@script
if(frame==0)
{
    void self = getlocalvar("self");
    void e;
    clearspawnentry();
    setspawnentry("name", "net");
    e = spawn();
    bindentity(e, self,0,1,30,-1,4);
    }
@end_script

I need to avoid it, dunno how.
 
Thanks for the code.
I'll use it for electric damages.

About burn, I'm thinking of rebuilding the spriteset of my Player and Enemy, so I can use easily burn effect and more. (after Backup)
The idea is now to take all the colors I could need in an entity.

Is there something else I should add in the entities palette?
-Character
-weapons
-lifebar graphics
-Motorcycle (for motorcycle stages)
-burned anim
-name fonts (and more)
-various personal effects
-select screen portrait / graphics
 
Since motorcycle mode usually use alternate weapon model, you should omit that from list. Same goes for weapons.
Effects are best spawned with script or spawnframe so exclude this from list as well.
 
But how can I destroy the spawned effect as soon as the player hits ground? (last frame of fall)
Also, if someone else make the player going to another anim, the flame effect have to disapear. But How?

Oh i forget to write that you need to use a landframe command in burn animation (but only in enemy txt):

anim burn
  landframe  6
        @cmd    spawnbind "Burn" 1 1 1
  loop  0
  delay  10
  offset  280 280
  sound  data/chars/enemy/fire.wav
  frame  data/chars/enemy/fire/f1.gif
  frame  data/chars/enemy/fire/f2.gif
  frame  data/chars/enemy/fire/f3.gif
  frame  data/chars/enemy/fire/f1.gif
  frame  data/chars/enemy/fire/f2.gif
  frame  data/chars/enemy/fire/f3.gif
  delay  30
  frame  data/chars/enemy/fire/onground.gif

With this when the enemy touches the ground animation will continue from frame 6 (which is "on the ground" sprite). So the Burn entity is enough to have frames only before the ground landing:

anim burn
  loop  0
  delay  10
  offset  280 280
  frame  data/chars/enemy/fire/f1.gif
  frame  data/chars/enemy/fire/f2.gif
  frame  data/chars/enemy/fire/f3.gif
  frame  data/chars/enemy/fire/f1.gif
  frame  data/chars/enemy/fire/f2.gif
  frame  data/chars/enemy/fire/f3.gif

With this flame will disappear when enemy touches the ground.
 
This is the way I use it:

name burnP
type     none
gfxshadow 1

animationscript data/scripts/grabscript.c

anim burn
loop 1 1 4
landframe 5

delay 3
offset 240 204
quakeframe 0 1 -4
sound data/sounds/fogo01.wav
frame data/chars/misc/burn/01.gif
frame data/chars/misc/burn/02.gif
frame data/chars/misc/burn/03.gif
frame data/chars/misc/burn/04.gif
frame data/chars/misc/burn/01.gif
@cmd suicide
frame data/chars/misc/empty.gif

 
Finally I included burn sprites in every entity.
Rachel, Mexican and Referee.
I just used the unused color slots of each entity palette to create a new regular colormap for each entity.
This way I don't have to restart with a new palette for everything.
And of course for the next players and enemies, I'll first create a correct palette to avoid future problems.
 
great, i sometimes change colours in burn sprites to match the ones in my characters palette more, i mean i used to because now i avoid this problem cause its painful to fix.
 
I pmed Plombo and Utunnels about that bug. This is something that needs to be fixed. Its not smart to have the char and effects colors on the same palette. This makes everything harder and increase the file size (since it stores more values).
 
yeah when you have burning sprites then you cant change yellow/ orange and red colours in remaps at all because burning sprite will change colours too.
 
Back
Top Bottom