Difference between revisions of "Modding:Affects"
From DoomRL Wiki
Shark20061 (Talk | contribs) m (Forgot to change the title of table 2.) |
Shark20061 (Talk | contribs) m (Consistancy...) |
||
Line 24: | Line 24: | ||
{|class="wikitable" style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;" | {|class="wikitable" style="border: 2px solid darkred; border-spacing: 0; font-size: 90%; margin: 0.25em 0.5em;" | ||
− | ! colspan="2" style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Affect | + | ! colspan="2" style="background: darkred; color: yellow; font-size: 120%; text-align: center"|'''Affect Hooks''' |
{{Table2Col | {{Table2Col | ||
|es=background: #333; | |es=background: #333; |
Revision as of 17:11, 24 March 2012
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 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.