hitflash palette help

Gurtag

Member
hello guys, i am working on a char that have several alternatepals and would like its effects colors/palette match with the char palette in use, i had no trouble with projectile or otter entities as i use a spawnmap script by ilu, but with hitflashes i cant seem to find a way to implement it, is there a method or script to do this with hitflashes?
 
I would of never thought to use openborvariant("lasthit_attacker");


Thanks everyone, I was starting to pull my hair out over the target binding in didhitscript because it didn't "look" right. onspawnscript is much easier, accurate and functional.
Thank you for this interesting question which could be useful for many projects: indeed, having a common palette for everything belonging to a given entity would be an excellent thing.
 
The lasthit variables are very useful and powerful to leverage. It's actually a single internal global structure the engine populates when a hit occurs. It's open to script and a very dependable way to get information like what @danno needed at time of hit without having to pas around your own global variables or do complex enumerations.

C:
// Caskey, Damon V.
// 2013-12-15
//
// Last hit structure. Populated each time a collision is detected.
typedef struct
{
    int                            confirm;                    // Will engine's default hit handling be used?
    s_axis_principal_float        position;                   // X,Y,Z of last hit.
    s_collision_attack*         collision_attack;           // Collision container for attack.
    s_attack*                   attack;                     // Attack object (has attack properties).
    s_collision_body*           detect_collision_body;      // Collision container for body.
    s_body*                     detect_body;                // Body object (has body properties).
    s_collision_attack*         detect_collision_attack;    // When hit by counterattack, this is collision attack container taking hit.     
    struct entity*                target;                        // Entity taking the hit.
    struct entity*                attacker;                    // Entity dishing out the hit.
    
} s_lasthit;

DC
 
Back
Top Bottom