Jump to navigation Jump to search
EVENT_EGS is a Game Event.
This event occurs the moment a sprite is spawned.
useractor notenemy ACTOR espawn PIGCOP ifvarg RETURN -1 setactor[RETURN].pal 1 enda onevent EVENT_EGS ifactor PIGCOP spritepal 2 endevent
In this case, the PIGCOP palette will be 1, because the EVENT_EGS code is triggered before the lines below the spawn command.