Spawn Palette over animation

danno

Moderator
Staff member
I know I can spawn and entity with palette but to save me creating 20 different entities or creating more sprites is there a way I can spawn a palette over a specific animation only?

for example sending to death

death 2 (by lightning)

AEC7eyR.png


death 3 (by poison)

jS1DMBD.png


death 4 (by fire)

HnfRdaD.png


death 5 (by ice)

tQSgxpe.png


death 6 (by loving a person just a little too much)

h0MXNO7.png



same animation data, same sprites, different palette over animation



 
danno said:

danno,

There is an option that allows every single frame to have its own palette, but that affects the entire model. You can't enable it for specific animations.

You can always just make palettes for each effect and switch them with forcemap or script... but, there's another way I think you'll like better if you try: Tinting. Why bother with palettes at all? Just slap a tint over the entity with whatever colors you feel like and its done.

http://www.chronocrash.com/forum/index.php?topic=2236.0

https://www.youtube.com/watch?v=naGYx-IBJBY

DC
 
danno,

Yeah, I just noticed and fixed it. Sorry about that.

I also just recorded a quick clip so you could see what it looks like in action.

https://www.youtube.com/watch?v=naGYx-IBJBY

DC
 
Code:
    if(animation == openborconstant("ANI_DEATH") || animation == openborconstant("ANI_BURNPAIN"))
    {
        // Set transparency mode for tint, and apply tint color.
        changedrawmethod(ent, "tintmode", EFFECT_TINT_BURN_MODE);
        changedrawmethod(ent, "tintcolor", EFFECT_TINT_BURN);

        // Nothing else to do, so exit the function.
        return;
    }

Tried it on a few different mods because the module that comes with tint has no death animations, same result, but death animation inside tint module, same result

log

Code:
Total Ram: 2147483647 Bytes
 Free Ram: 2147483647 Bytes
 Used Ram: 6242304 Bytes

debug:nativeWidth, nativeHeight, bpp, Hz  1536, 864, 24, 60
OpenBoR v3.0 Build 4153, Compile Date: Apr 22 2015

Game Selected: ./Paks/bor.pak

FileCaching System Init......	Disabled
Initializing video............
Reading video settings from 'data/video.txt'.
Initialized video.............	320x240 (Mode: 0, Depth: 32 Bit)

Loading menu.txt.............	Done!
Loading fonts................	1 2 3 4 Done!
Timer init...................	Done!
Initialize Sound..............	
Loading sprites..............	Done!
Loading level order..........	Done!
Loading model constants......	Done!
Loading script settings......	Done!
Loading scripts..............	Can't find openbor constant 'ANI_DEATH' 

Script compile error in 'data/scripts/common/effect_tint.c': openborconstant line 105, column 20
Script error: failed to import 'data/scripts/common/effect_tint.c': failed to compile

********** An Error Occurred **********
*            Shutting Down            *

Can't compile script 'updated' 
Total Ram: 2147483647 Bytes
 Free Ram: 2147483647 Bytes
 Used Ram: 26820608 Bytes

Release level data...........	Done!
Release graphics data........	Done!
Release game data............


Release game data............	Done!
Release timer................	Done!
Release input hardware.......	Done!
Release sound system.........	Done!
Release FileCaching System...	Done!

**************** Done *****************

Can't compile script 'updated'

ANI_PAIN works but can't find death
 
Back
Top Bottom