EVENT OPERATEACTIVATORS

From EDukeWiki
Jump to navigation Jump to search
Event ID player# THISACTOR RETURN
EVENT_OPERATEACTIVATORS player who operated current sprite 1 value

EVENT_OPERATEACTIVATORS is a Game Event.

This event is triggered for each STAT_ACTIVATOR sprite with a matching lotag when OperateActivators() is called.

In practice, this applies to Buttons, Touchplates, two-way trains and the CON command Operateactivators

THISACTOR will be set to the current matching STAT_ACTIVATOR spriteNum and from there it's possible to do further matching.

This code runs just before the actual Activator & Activatorlocked sprites get checked so it's possible to write your additional logic that modifies their normal behavior

Setting RETURN as -1 to cancel the remaining hardcoded behavior for Activator, Activatorlocked, underwater SE18/31/32/36 special cases and OperateSectors() call. Respawns will still be triggered regardless.

Note: This does not handle masterswitches as they are STAT_STANDABLE