NoMansSky:Reference Guides/Actions and Triggers: Difference between revisions

From Step Mods | Change The Game
No edit summary
Line 2: Line 2:
{{NMSPage|contentTitle=Reference Guides // Actions and Triggers}}
{{NMSPage|contentTitle=Reference Guides // Actions and Triggers}}
== TriggerAction ==
== TriggerAction ==
'''<Data template="GcTriggerActionComponentData">'''
 


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.
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.

Revision as of 01:13, July 29, 2020

TriggerAction[edit | edit source]

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.

For example usages see this list.

Triggers[edit | edit source]

Trigger Description
GcStateTimeEvent 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.
GcBeenShotEvent 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".
GcPlayerNearbyEvent 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.
GcCreatureNearbyEvent 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.
GcAnimFrameEvent Triggered when a certain frame is reached in an Anim (TkAnimationData object)
GcStormEvent Triggered when a storm appears during game where the entity is located.

Actions[edit | edit source]

Some more Tables

Template:NMSPageClose