Remove Action

Remove Action describes a step of the procedure which user has to remove an object using his hands or a another interactable.

Example of Remove Action Script:

Prefab Remove Type

Action Script Explanation

  1. Set Remove Prefab

This method sets the Action’s removable actors to initialize the Action behavior. To set a Remove actor you need a string which contains the path to the removable blueprint. This method can be called many times in an Action Blueprint. Each time Set Remove Prefab is called a new removable actor is added and spawned into the remove prefabs List. To perform the Action, the user needs to remove all of them.

  1. Set Hologram Object

Usually a remove Action does not have a hologram. Instead we use a flashing indicator at the removable object. To enable the flashing functionality you need to check the “Attach Prefab Spawn Notifier” option at the Interactable Prefab Constructor script.

  1. Prefab Constructor

To generate a removable prefab you need to select the “Simple Grabbable Actor” option at the create prefab sub-menu. To enable the Remove Action functionality for this object you must select the “Remove” option in the Prefab Interactable Type property field at Prefab constructor script.

Adding More to it

A more advanced example is the following:

Prefab Remove With Tools

In this example we are also specifying a tool which will be used for removing the object by adding the blueprint’s path in the Tool Prefab Path argument of Set Remove Prefab function. In the interactable constructor of the removable object it is important to set the Prefab Interactable Type to Remove With Tools as well as the Prefab Detach Feature to EventTriggerCurrLSAOnDestroy.