Fox, on 16 December 2014 - 06:16 AM, said:
For sprites, the following will do, assuming the attached PALETTE.DAT table is used.
gamevar tmp 0 0
gamevar cs 0 0
state setup_animatesprites
getactor[THISACTOR].mdflags tmp
orvar tmp 16
setactor[THISACTOR].mdflags tmp
ends
onevent EVENT_EGS
state setup_animatesprites
endevent
onevent EVENT_LOADACTOR
state setup_animatesprites
endevent
// Assuming a PALETTE.DAT with e.g.:
// blend 0: 50/50 alpha
// blend 1: factor 1.0 additive
onevent EVENT_ANIMATESPRITES
getactor[THISACTOR].cstat cs
ifvarand cs 2 ifvarand cs 512
setactor[THISACTOR].blend 1
else
setactor[THISACTOR].blend 0
endevent
Note how I set mdflags[].flags' bit 16 for both cases of sprite creation (premap and in-game spawn), unconditionally for all sprites.
Attached File(s)
-
PALETTE_1-addtv.zip (49.12K)
Number of downloads: 307