Skip to main content

Action

Contains functions for common actions an Entity can perform.

Functions

turnOn()

Switches the Entity to the 'on' state.

Example

Permanently activate floor spikes after 2 seconds.

function onStart()
Action.turnOff()
Task.wait(2)
Action.turnOn()
end
Result

turnOff()

Switches the Entity to the 'off' state.

Example

Turn on and off floor spikes every 1 second.

function onStart()
Action.turnOff()
while true do
Task.wait(1)
Action.turnOn()
Task.wait(1)
Action.turnOff()
end
end
Result