Define a custom action in the player portal and copy its id.
In any script where you want to perform the custom action, set up custom actions as follows:
- Create a variable of type GG_CustomActions in the script where you want the custom action.
- Grab reference to GG_CustomActions using FindObjectOfType<>.
- Use the method variableName.PerformCustomAction(“id”) and pass in your custom action id which can be found in the player portal where you created this custom action.
Now for the sake of this example, the custom action represented by the id will be triggered whenever the player dies in this case.