MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / HandleEvent

Method HandleEvent

TombEngine/Scripting/Internal/TEN/Logic/LogicHandler.cpp:263–266  ·  view source on GitHub ↗

Attempt to find an event set and execute a particular event from it. @function HandleEvent @tparam string name Name of the event set to find. @tparam Logic.EventType type Event to execute. @tparam[opt=Lara] Objects.Moveable activator Optional activator. @usage -- Executes the "ENTER" volume event of the event set named "MyVolumeEvent" TEN.Logic.HandleEvent("MyVolumeEvent", TEN.Logic.EventType.E

Source from the content-addressed store, hash-verified

261 TEN.Logic.HandleEvent("MyGlobalEvent", TEN.Logic.EventType.LOAD, enemy)
262*/
263void LogicHandler::HandleEvent(const std::string& name, EventType type, sol::optional<Moveable&> activator)
264{
265 TEN::Control::Volumes::HandleEvent(name, type, activator.has_value() ? (Activator)(short)activator->GetIndex() : (Activator)(short)LaraItem->Index);
266}
267
268/*** Attempt to find an event set and enable specified event in it.
269

Callers

nothing calls this directly

Calls 3

HandleEventFunction · 0.85
has_valueMethod · 0.45
GetIndexMethod · 0.45

Tested by

no test coverage detected