Action Anatomy & Scripting
v1.0
Actions can do many things from adding "juice" to your game, to executing logic patterns. In addition to all the actions that ship with Juicy Actions, it's easy to write your own Actions that specifically target your game and custom classes.
Timing of Actions (types)
One way to think about diferent types of actions is the timing options. Each action has a timeBeforeNextAction value which generally will default to 0. This is displayed in the ActionExecutor in the Inspector, and is used by the ActionExecutor to determine how long to wait after executing one action before executing the next.
The three types of timing types can be seen highlighted in magenta.

The first type of actions do one thing, like SetGameObjectActiveAction which will turn a GameObject on or off, or toggle its value. You set the timeBeforeNextAction value directly.
Other actions, such as RectTransformScaleAction will do something over a duration. In the ActionExecutor, you can choose to set a custom timeBeforeNextAction, or use the duration of the action, which is useful when you want actions to execute one after another, without delay. Click the "Clock" button to toggle between custom values and the duration value.
The third type include WaitAction and WaitRandomAction. These actions are designed to delay the ActionExecutor by some amount of time. They will set the timeBeforeNextAction value directly.
In the example below, the RectTransformScale and CanvasGroupOpacity actions will execute together. Regardless of how long the duration is for each of those actions, the ActionExecutor will then wait 0.4 seconds before executing PlayAudioClip. Finally it will wait an additional 0.1 second and execute the RectTransformShake action.

ActionExecutor is on the "Start" button in the Sci-Fi Demo.Last updated
Was this helpful?