CFrobLever

From The DarkMod Wiki
Jump to: navigation, search

CFrobLever

The corresponding entityDef is atdm:mover_lever.

A simple two-state lever, to switch things on or off.

This class has additional code to get the trigger behaviour right. Movers of this type are uninterruptable and fire their targets only if they actually switch states. It's important for them not to fire their targets when obstructed or moving only half way to their other state.

Spawnargs

  • <no special spawnargs>

Script Events

scriptEvent void Operate();
Call this to toggle the lever
scriptEvent void Switch(float newState);
Set the new lever state to the argument (0 = "off")

C++ Methods and Events

  • <no special events>