Trigger Actions

Image showing a Player Interact TriggerAction component, as seen in the Entity Inspector.
Trigger Actions Overview
Functionality
Action Types
Environmental
- Difficulty (Game, Dungeon, Quest, Boss)
- Population (AG Village)
- Time
- Record
- Dungeon In/Complete
- Quest In/Complete
- Has Quest
- Weather
- OnStart
- Player Stats
- Player HasItem
- Every Seconds
- OnQuestStart
- OnQuestEnd
Collision Fields
- Proximity
- Correct InWorldObject Conditions
- Unit Stats
- Unit Inventory
- Pulse React
On Unit
- OnDeath
- Has/HasNot Stats
- Has/HasNot Item/Inventory
- Has/HasNot Equip
Interact Trigger Actions
Specific Trigger Actions activated by The Interact Input.
Passes Source interactor to DoActonFromInteractor, which fires the regular DoAction.
Interact Types
Self Firing
- World Item Interact
- Carry
- Pilot Unit
- Bonfire/Menu Open
Triggering
- Select
- Give Item
- Channel
- Craft
Using Trigger Actions
API
//! Override to establish your own DoAction process
//! Call Parent DoAction to see if Action Succeeds. Then use returned bool to process final behaviour.
virtual bool DoAction();
//! Override to establish your own ResetAction process
//! Call Parent ResetAction to see if Reset Succeeds. Then use returned bool to process final behaviour.
virtual bool DoResetAction();
//! Override to establish your own evaluation criteria.
virtual bool EvaluateAction() { return true; };
//! Override to establish your own reset evaluation criteria.
virtual bool EvaluateResetAction() { return true; };
Extending Trigger Actions
1 - Record Trigger Action

Image showing the RecordTriggerAction component, as seen in the Entity Inspector.
Record Trigger Action Overview
A component that triggers when the a defined record is changed to a certain value. Useful for connecting events on story progression flags, world variables etc.
Functionality
Inheriting from the RecordKeeperComponent’s Incoming Event Bus. It will automatically take in record updates and call TriggerActionComponent’s DoAction() if the changed record matches the local record’s name and value saved on the component.
Using Record Trigger Action
- Create an Entity and add the Record Trigger Action Component in the inspector.
- Set the Trigger Channel to the channel where you want your trigger to fire.
- Define the record name, this is the name of the record you are looking at for changes.
- Define the record value, set this value to what value the recordName needs to be at in order to trigger the action.
API
From TriggerActionComponent
//! Returns true if the values of the changed record's data is the same as our local record (This runs when DoAction() is called).
//! Override to establish your own evaluation criteria.
virtual bool EvaluateAction() { return true; };
From RecordKeeperIncomingEvents
//! Calls TriggerActionComponent's Definition of DoAction() when the defined record is changed.
//! Override to trigger when your record is changed.
virtual void RecordChanged() { return true; };
Extending Record Trigger Action