CFrobLever

From The DarkMod Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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>