Inside this environment we can have Actions and Triggers. If this environment has an ID, the TriggerAction can be called from a SimpleInteraction as well as a normal Interaction.
If you want the set of ActionTriggers to only be called upon interaction, the game has a reserved ID that is loaded when the object in created. This ID is BOOT. If you create an ActionTrigger with the ID BOOT it will be run when the object is created, but it will also block other actions from happening. Once you interact, the ActionTrigger specified will be run, and you can chain/branch ActionTriggers from there.
||Triggered after the specified number of seconds has passed. Use this with a time of 0s as a default trigger if the actual trigger is the StateID only.
||Damage threshold can be set, and you can set whether the trigger occurs when the entity is shot by the ShotBy Types "Player" or "Anything".
||Triggered when the player is nearby. This has a number of different options. You can define trigger conditions as well: "None", "Fire", "InShip", "OnFoot", "OnFootOutside", "Upload". Has an inverse option so it can trigger when a player is not near and leaves.
||Triggered when a creature is nearby where the ENTITY is located. Can have a table with GcCreatureAlertData. Has an inverse option so it can trigger when a creature is not near or leaves.
||Triggered when a certain frame is reached in an Anim (TkAnimationData object)
||Triggered when a storm appears during game where the entity is located.
||Plays an audio file. Need to figure out whether it is just the name or what.
||Plays an animation that is defined within the ~.ENTITY.mbin
||This seems to jump to another ActionTrigger by activating the defined StateID, so you can chain and activate multiple ActionTriggers from one. You can broadcast the StateID to other entities which are also part of the scene even as children of another node. Broadcast level can be "Scene", "LocalModel" or "Local".|
You can also create action loops if you trigger a state that re-triggers the primary trigger again. A GcRewardTrigger in the REWaRDTABLE can also trigger a StateID.
||Shakes the camera. Has a couple of options.
||Does damage to the player (not only). The value of Damage needs to be in the METADATA/REALITY/TABLES/DAMAGETABLE.mbin|
You can also use damage types that only have a push effect and no damage like "JUSTPUSH".
||You can use this to deactivate or activate components (nodes) of the object. The Name is the name of a TkSceneNodeData child in the entities parent ~.SCENE.mbin. You might be able to do lots of cool stuff with this by allowing triggered events to toggle components of the entity, which can also have attached .ENTITY.mbin’s.|
Options for NodeActiveState: "Activate", "Deactivate", "Toggle", "Add", "Remove", "RemoveChildren"
By using "Activate", "Deactivate" and "Toggle" state options you can enable a ENTITY and it's components on demand. That implies a lot of usage possibilities.
||If you are in your ship this will warp you as if you had flown into a black hole.
||The value of Reward is given to the player. The value must exist in the REWARDTABLE.mbin file. Triggering rewards extends the amount of available actions immensely. See here.
||Untested, but should able to spawn other entities. Not sure at the moment where the Event value has to be. Is there a list of entities, or maybe something in the parent ~.SCENE.mbin?|
If you look in the /MODELS/COMMON/DEMOS/E32015/ files you can see this used. However, after extensive testing it seems this is extremely limited in functionality and GcNodeActivationAction is probably a better fit.
||Untested. Only has one option, with a Boolean DestroyAll. I don’t know what all entails. Will need to be tested.|
*This seems to only be used in the ALARM.ENTITY file currently... Not sure what it does but that's where it's used.
||Used to create particles effects.
||Used to create a text overlays. Display types: Full, Compact, EyeLevel, Prompt, Tooltip
||Scares creatures near the entity.
||Options related to base electricity.
||Produces a chosen hazard effect around. (TOXIC, RADIOACTIVE, ....)
||"Repair", "UpdateDamagedComponents" or "CargoPhoneCall"
||Options: UseCorePartsOnlyEnum, TkGraphicsDetailTypes
||Trigger a simple interaction that exists in the same entity file. No parameters to set. This action extends the amount of actions considerably. See here.
||Reset a simple interaction that exists in the same entity file to it's default state. No parameters to set.
||Produces a fiend crime action with a FiendCrimeType ("None", "RockTransform" or "UnderwaterPropCollected") and a FiendCrimeModifier value.
There seems to be a number of reserved ID’s by the game that are probably only called when certain things happen. The ID’s are as follows:
||Called when the object is created and is used to block other ActionTriggers from being triggered.
||Called when the interaction begins (eg, think the interaction with the terminals in the game).
||Same as above but when the interaction finishes.
||Assumedly called when the interaction is dismissed.
||Assumedly called when an option is picked (not any specific one, just any option)
||Possibly an ActionTrigger ID you can call in the interaction that causes the scene to become inactive once all the other ActionTrigger stuff has played out?
||Triggered when a power connection is cut.
||Triggered when connected to a power supply is established.