Step 1

Define a custom action in the player portal and copy its id.

Step 2

In any script where you want to perform the custom action, set up custom actions as follows:

Figure 1 : Custom Actions

  1. Create a variable of type GG_CustomActions in the script where you want the custom action.
  2. Grab reference to GG_CustomActions using FindObjectOfType<>.
  3. 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.

You might like these

No items found.