C4 Engine
C4 Engine API Documentation

Controller::ActivateController

Defined in:  C4Controller.h
Called when a controller is activated by some kind of trigger.
Prototype

virtual void ActivateController(Node *initiator, Node *trigger);

Parameters
initiator The node that activated the trigger. This can be nullptr.
trigger A pointer to the node that caused the controller to be activated. This can be nullptr.
Description
The ActivateController function is called when some kind of trigger in the world causes a controller to be activated. This function can be called because a Trigger node was activated, or it can be called by a script. A controller subclass may perform whatever action is appropriate in response to the activation.

The default implementation performs no action, so any override of the ActivateController function does not need to call the base class counterpart.
See Also

Controller::DeactivateController

World::ActivateTriggers

Trigger