Functions | |
constexpr EntityEventMask | EventToMask (EEvent event) |
Main namespace for the entity system Note that moving entity types under this namespace is still early in the works!
|
strong |
EEvent defines all events that can be sent to an entity.
Enumerator | |
---|---|
TransformChanged | Sent when the entity local or world transformation matrix change (position/rotation/scale). nParam[0] = combination of the EEntityXFormFlags. |
TransformChangeDone | Called when the entity is moved/scaled/rotated in the editor. Only send on mouseButtonUp (hence finished). |
TimerExpired | Sent when the entity timer expire. nParam[0] = TimerId, nParam[1] = milliseconds. |
Initialize | Sent for unremovable entities when they are respawn. |
Remove | Sent before entity is removed. |
Reset | Sent to reset the state of the entity (used from Editor). nParam[0] is 1 if entering game mode, 0 if exiting |
ChildAttached | Sent to parent entity after child entity have been attached. nParam[0] contains ID of child entity. |
AttachedToParent | Sent to child entity after it has been attached to the parent. nParam[0] contains ID of parent entity. |
ChildDetached | Sent to parent entity after child entity have been detached. nParam[0] contains ID of child entity. |
DetachedFromParent | Sent to child entity after it has been detached from the parent. nParam[0] contains ID of parent entity. |
LinkAdded | Sent to an entity when a new named link was added to it (normally through the Editor)
|
LinkRemoved | Sent to an entity when a named link was removed from it (normally through the Editor)
|
Hidden | Sent when the entity must be hidden. |
Unhidden | Sent when the entity must become not hidden. |
LayerHidden | Sent when the entity must be hidden. |
LayerUnhidden | Sent when the entity must become not hidden. |
PhysicsToggled | Sent when a physics processing for the entity must be enabled/disabled. nParam[0] == 1 physics must be enabled if 0 physics must be disabled. |
PhysicsStateChanged | Sent when a physics in an entity changes state. nParam[0] == 1 physics entity awakes, 0 physics entity get to a sleep state. |
LuaScriptEvent | Sent when script is broadcasting its events. nParam[0] = Pointer to the ASCIIZ string with the name of the script event. nParam[1] = Type of the event value from IEntityClass::EventValueType. nParam[2] = Pointer to the event value depending on the type. |
OtherEntityEnteredArea | Sent when triggering entity enters to the area proximity, this event sent to all target entities of the area. nParam[0] = TriggerEntityId, nParam[1] = AreaId, nParam[2] = EntityId of Area |
OtherEntityLeftArea | Sent when triggering entity leaves the area proximity, this event sent to all target entities of the area. nParam[0] = TriggerEntityId, nParam[1] = AreaId, nParam[2] = EntityId of Area |
OtherEntityEnteredNearArea | Sent when triggering entity is near to the area proximity, this event sent to all target entities of the area. nParam[0] = TriggerEntityId, nParam[1] = AreaId, nParam[2] = EntityId of Area fParam[0] = distance |
OtherEntityLeftNearArea | Sent when triggering entity leaves the near area within proximity region of the outside area border. nParam[0] = TriggerEntityId, nParam[1] = AreaId, nParam[2] = EntityId of Area |
OtherEntityMoveInsideArea | Sent when triggering entity moves inside the area within proximity region of the outside area border. nParam[0] = TriggerEntityId, nParam[1] = AreaId, nParam[2] = EntityId of Area |
OtherEntityMoveNearArea | Sent when triggering entity moves inside the area within the near region of the outside area border. nParam[0] = TriggerEntityId, nParam[1] = AreaId, nParam[2] = EntityId of Area, fParam[0] = FadeRatio (0-1) |
PhysicsThreadPostStep | Sent when an entity with pef_monitor_poststep receives a poststep notification (the hamdler should be thread safe!) fParam[0] = time interval |
PhysicalObjectBroken | Sent when Breakable object is broken in physics. |
PhysicsCollision | Sent when a logged physical collision is processed on the Main thread. The collision has already occurred since this event is logged, but can be handled on the main thread without considering threading. nParam[0] = const EventPhysCollision *, contains collision info and can be obtained as: reinterpret_cast
|
PhysicsThreadCollision | Sent when a physical collision is reported just as it occurred, most likely on the physics thread. This callback has to be thread-safe! nParam[0] = const EventPhysCollision *, contains collision info and can be obtained as: reinterpret_cast |
RenderVisibilityChanged | Sent only if ENTITY_FLAG_SEND_RENDER_EVENT is set Called when entity is first rendered (When any of the entity render nodes are considered by 3D engine for rendering this frame) Or called when entity is not being rendered for at least several frames nParam[0] == 0 if rendeing Stops. nParam[0] == 1 if rendeing Starts. |
LevelLoaded | Called when the level loading is complete. |
LevelStarted | Called when the level is started. |
GameplayStarted | Called when the game is started (games may start multiple times). |
EnterLuaScriptState | Called when the entity enters a script state. |
LeaveLuaScriptState | Called when the entity leaves a script state. |
DeserializeSaveGameStart | Called before we serialized the game from file. |
DeserializeSaveGameDone | Called after we serialized the game from file. |
BecomeInvisible | Called when the entity becomes invisible. nParam[0] = if 1 physics will ignore this event |
BecomeVisible | Called when the entity gets out of invisibility. nParam[0] = if 1 physics will ignore this event |
OverrideMaterialChanged | Called when the entity material change. nParam[0] = pointer to the new IMaterial. |
MaterialLayerChanged | Called when the entitys material layer mask changes. |
AnimationEvent | Called when an animation event (placed on animations in editor) is encountered. nParam[0] = AnimEventInstance* pEventParameters. nParam[1] = ICharacterInstance* that this event occurred on |
LuaScriptSetColliderMode | Called from ScriptBind_Entity when script requests to set collidermode. nParam[0] = ColliderMode |
ActivateFlowNodeOutput | Called to activate some output in a flow node connected to the entity nParam[0] = Output port index nParam[1] = TFlowInputData* to send to output |
EditorPropertyChanged | Called in the editor when a property of the selected entity changes. This is not sent when using IEntityPropertyGroup nParam[0] = IEntityComponent pointer or nullptr nParam[1] = Member id of the changed property, (
|
ReloadLuaScript | Called when a script reloading is requested and done in the editor. |
SubscribedForUpdates | Called when the entity is added to the list of entities that are updated. Note that this event is deprecated, and should not be used |
UnsubscribedFromUpdates | Called when the entity is removed from the list of entities that are updated. Note that this event is deprecated, and should not be used |
NetworkAuthorityChanged | Called when the entity's network authority changes. Only the server is able to delegate/revoke the authority to/from the client. nParam[0] stores the new authority value. |
BecomeLocalPlayer | Sent once to the to the client when the special player entity has spawned.
|
AddToRadar | Called when the entity should be added to the radar. |
RemoveFromRadar | Called when the entity should be removed from the radar. |
NameChanged | Called when the entity's name is set. |
AudioTriggerStarted | Called when an event related to an audio trigger occurred. REMARK:: Only sent for triggers that have their ERequestFlags set to receive Callbacks via (CallbackOnExternalOrCallingThread | DoneCallbackOnExternalThread) from the main-thread nParam[0] stores a const CryAudio::SRequestInfo* const |
AudioTriggerEnded | Remark: Will also be sent, if the trigger failed to start. |
SlotChanged | Sent when an entity slot changes, i.e. geometry was added nParam[0] stores the slot index |
PhysicalTypeChanged | Sent when the physical type of an entity changed, i.e. physicalized or dephysicalized. |
NetworkReplicatedFromServer | Entity was just spawned on this machine as requested by the server. |
PrePhysicsUpdate | Called when the pre-physics update is done; fParam[0] is the frame time. |
Update | Sent when the entity is updating every frame. nParam[0] = pointer to SEntityUpdateContext structure. fParam[0] = frame time |
Last | Last entity event in list. |