Record Trigger Action
Categories:

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
//! 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; };