Modding:Affects

From DoomRL Wiki

Revision as of 17:10, 24 March 2012 by Shark20061 (Talk | contribs)

Jump to: navigation, search

These represent the various temporary effects in the game.

Prototype

Affect Prototype
string id The identifier for the affect.
string name What is displayed in the status line while the effect is active.
Color color The color of the name on the status line while the effect is on.
Color color_expire The color of the name on the status line when the effect is wearing off.
string message_init The message printed when the effect is activated.
string message_ending The message printed when the effect is wearing off. This is unused in 0.9.9.6.
string message_done The message printed when the effect wears off.
StatusEffect status_effect The overlay effect that occurs while this effect is active.
integer status_strength When multiple effects have overlay changes, the one with the highest strength will be the overlay displayed if more than one is active at the same time.

Engine Hooks

Affect Engine Hooks
void OnAdd(Affect self)
void OnTick(Affect self)
void OnRemove(Affect self)

OnAdd(Affect self)
This is called when the effect is gained.

OnTick(Affect self)
This is called every action while the effect is active.

OnRemove(Affect self)
This is called when the effect is lost.
Personal tools