Sequencer Commands
v1.0
The JuicyActions() sequencer command executes Juicy Actions ActionExecutors from within Dialogue System sequences. This allows you to trigger visual effects, animations, sounds, and any other Actions during conversations.
Syntax & Parameters
JuicyActions(actionExecutor, target, [wait], [scope], [id], [duration]);actionExecutor
string
β Yes
-
Name of the public ActionExecutor field on the target GameObject
target
string
β Yes
speaker
Target GameObject (see Target Resolution below)
wait
bool
β No
false
If true, sequence waits for ActionExecutor to complete timeBeforeNextAction before continuing
scope
string
β No
Current conversation
Scope identifier for tracking/cleanup (e.g., "global", "conversation", custom ID)
id
string
β No
Auto-generated
Custom ID for this specific execution
duration
float
β No
None
Duration override in seconds (overrides ActionExecutor's configured duration)
Target Resolution
The target parameter supports several resolution methods:
Dialogue System Keywords:
speaker- The current speaker in the conversationlistener- The current listener (usually the player)conversant- The conversant in the conversationactor- The actor (synonym for speaker)
GameObject References:
MyGameObject- GameObject name (requires exact match viaGameObject.Find())tag:TagName- Find GameObject by tag (e.g.,tag:Player,tag:MainCamera)Root/Child/SubChild- Hierarchical path lookup
Examples
Basic Usage (Fire and Forget):
Executes the OnAngryActions executor on the speaker immediately and continues the sequence. Will end when the Conversation ends.
Wait for Completion:
Executes HitReaction on the speaker and waits for it to complete before continuing the sequence.
Custom Duration:
Executes CameraShake on MainCamera GameObject with a 2.5-second duration override, using global scope.
Tag-Based Targeting:
Finds the first GameObject with tag "Enemy" and executes the effect.
Cancelling Actions
By default ActionExecutors will end with the conversation, though in most cases they will have finished their actions prior to that point.
Global Scope
Custom Scope
Mixing Scope
Lua Functions
The Juicy Actions integration provides Lua functions that can be called from Dialogue System Lua scripts, conditions, and dialogue entry fields. These functions provide programmatic control over ActionExecutor execution.
Available Functions
JuicyActions.Execute()
Executes an ActionExecutor immediately (fire and forget).
Syntax:
Parameters:
actionName(string): Name of the public ActionExecutor fieldtargetGameObject(GameObject): Target GameObject referencescope(string, optional): Scope identifier (default: current conversation)id(string, optional): Custom execution ID (default: auto-generated)duration(number, optional): Duration override in secondspreset(string, optional): Preset name to use
Returns: void
Example:
Example with Options:
JuicyActions.ExecuteAndWait()
Executes an ActionExecutor and waits for it to complete. Only use this in sequencer commands or coroutines.
Syntax:
Parameters: Same as Execute()
Returns: void (blocks until completion)
β οΈ Important: This function blocks execution. Only use it:
In sequencer Lua commands:
Lua(JuicyActions.ExecuteAndWait(...))In coroutines where blocking is acceptable
Never in conditions or immediate Lua evaluations (will freeze the conversation!)
Example (in sequencer):
JuicyActions.Stop()
Stops all ActionExecutors with a specific scope or ID.
Syntax:
Parameters:
scopeOrId(string): Scope name or execution ID to stop
Returns: void
Example:
JuicyActions.StopAll()
Stops all running ActionExecutors across all scopes.
Syntax:
Parameters: None
Returns: void
Example:
β οΈ Use with caution: This stops ALL Juicy Actions in the entire game, not just conversation-related ones.
JuicyActions.IsExecuting()
Checks if any ActionExecutors are currently running in a specific scope or ID.
Syntax:
Parameters:
scopeOrId(string): Scope name or execution ID to check
Returns: boolean - true if executing, false otherwise
Example (in a condition):
Example (in a Script field):
Lua vs Sequencer Commands
Understanding when to use Lua functions vs sequencer commands:
Timing
Immediate execution
Timed with sequence
Wait Support
ExecuteAndWait (blocks)
wait=trueparameter
Use in Conditions
β Yes (Execute, IsExecuting)
β No
Use in Scripts
β Yes
β No
Parallel Execution
Sequential in Lua
β Easy with sequence timing
Best For
Programmatic control, branching
Timed cutscenes, cinematics
When to use Lua:
Dynamic execution based on variable values
Conditional triggering in dialogue conditions
Programmatic control from Scripts
Checking execution state
When to use Sequencer Commands:
Synchronized timing with camera cuts, animations
Parallel effects (shake camera + flash screen + play sound)
Wait for completion before continuing sequence
Visual sequencing in the Dialogue Editor
Common Lua Patterns
Conditional Execution Based on Variables:
Execute Different Effects Based on Quest State:
Stop Previous Effects Before Starting New Ones:
Check if Effect is Running Before Triggering:
Accessing GameObjects in Lua
To reference GameObjects in Lua, use these methods:
Actor References (for participants in conversation):
GameObject.Find by name:
GameObject.FindWithTag:
Example:
Troubleshooting
"Conversation freezes when using ExecuteAndWait"
Only use
ExecuteAndWait()in sequencer Lua commands:Lua(JuicyActions.ExecuteAndWait(...))Never use it in conditions or Scripts that run during dialogue evaluation
Use
Execute()for fire-and-forget instead
"Lua error: attempt to index nil value"
Check that GameObject exists:
if Actor["Player"] ~= nil thenVerify Actor names match exactly (case-sensitive)
Use
GameObject.Find()for non-participant GameObjects
"Actions don't stop when conversation ends"
Make sure you're using the default scope (conversation) or explicitly setting
scope="conversation"Global scope actions won't auto-cleanup:
scope="global"
Hope this helps! Let me know if you'd like me to expand on any sections or add more examples! π
Last updated