Skip to content
SoulFire LogoSoulFire

Triggers

Inputs, outputs, and defaults of the 12 built-in nodes in the Triggers category.

Generated from the pinned SoulFire source. Regenerate these pages with bun run generate-node-reference.

On Chat

trigger.on_chat (trigger)

Fires when a chat message is received

Also called: chat, message, text, say, talk, receive.

Inputs

None.

Outputs

PortTypeDescription
out (Out)execExecution output
bot (Bot)botThe bot that received the message
message (Message)anyThe chat message component
messagePlainText (Message (Plain Text))stringThe chat message as plain text
timestamp (Timestamp)numberTimestamp when the message was received

Implementation

On connection created

trigger.on_bot_init (trigger)

Fires early when the bot connection is initialized (before player is ready)

Also called: On Bot Init, init, initialize, start, connect, early.

Inputs

None.

Outputs

PortTypeDescription
out (Out)execExecution output
bot (Bot)botThe bot being initialized
serverAddress (Server Address)stringThe server address
username (Username)stringThe bot's username

Implementation

On Container Open

trigger.on_container_open (trigger)

Fires when a any container has been opened

Also called: inventory, container, menu, open.

Inputs

None.

Outputs

PortTypeDescription
out (Out)execExecution output
bot (Bot)botThe bot that opened the container
containerId (Container ID)numberThe ID of opened container
containerName (Container Name)stringThe name of opened container
containerType (Container Type)stringThe type of opened container

Implementation

On Damage

trigger.on_damage (trigger)

Fires when the bot takes damage (health decreases)

Also called: damage, hurt, health, attack, hit.

Inputs

None.

Outputs

PortTypeDescription
out (Out)execExecution output
bot (Bot)botThe bot that took damage
amount (Amount)numberAmount of damage taken
previousHealth (Previous Health)numberHealth before damage
newHealth (New Health)numberHealth after damage

Implementation

On Death

trigger.on_death (trigger)

Fires when the bot dies

Also called: death, die, dead, killed, respawn.

Inputs

None.

Outputs

PortTypeDescription
out (Out)execExecution output
bot (Bot)botThe bot that died
shouldRespawn (Should Respawn)booleanWhether the bot should respawn

Implementation

On Disconnect

trigger.on_disconnect (trigger)

Fires when the bot is disconnected from the server

Also called: disconnect, leave, kick, timeout, connection.

Inputs

None.

Outputs

PortTypeDescription
out (Out)execExecution output
bot (Bot)botThe bot that was disconnected
reason (Reason)stringThe disconnect reason message

Implementation

On Interval

trigger.on_interval (trigger)

Fires at a configurable interval. Does not provide a bot; use GetBots + ForEachBot downstream for bot actions.

Also called: interval, timer, repeat, periodic, schedule.

Inputs

PortTypeRequired / defaultDescription
intervalMs (Interval (ms))number1000Interval in milliseconds between executions

Outputs

PortTypeDescription
out (Out)execExecution output
executionCount (Execution Count)numberNumber of times this trigger has fired

Implementation

On player ready

trigger.on_join (trigger)

Fires when the bot has fully joined and the player is ready to interact

Also called: On Join, join, connect, login, server, spawn, ready.

Inputs

None.

Outputs

PortTypeDescription
out (Out)execExecution output
bot (Bot)botThe bot that joined
serverAddress (Server Address)stringThe server address
username (Username)stringThe bot's username

Implementation

On Post Entity Tick

trigger.on_post_entity_tick (trigger)

Fires after entity physics each tick (synchronous on tick thread)

Also called: tick, update, loop, post, entity, after, attack.

Inputs

None.

Outputs

PortTypeDescription
out (Out)execExecution output
bot (Bot)botThe bot that ticked
tickCount (Tick Count)numberTicks since script started

Implementation

On Pre Entity Tick

trigger.on_pre_entity_tick (trigger)

Fires before entity physics each tick (synchronous on tick thread)

Also called: tick, update, loop, pre, entity, before, rotation.

Inputs

None.

Outputs

PortTypeDescription
out (Out)execExecution output
bot (Bot)botThe bot that ticked
tickCount (Tick Count)numberTicks since script started

Implementation

On Script End

trigger.on_script_end (trigger)

Fires once when the script is being stopped

Also called: end, stop, finish, script, cleanup, shutdown.

Inputs

None.

Outputs

PortTypeDescription
out (Out)execExecution output
timestamp (Timestamp)numberThe timestamp when the script is ending

Implementation

On Script Init

trigger.on_script_init (trigger)

Fires once when the script is started

Also called: init, start, begin, script, launch.

Inputs

None.

Outputs

PortTypeDescription
out (Out)execExecution output
timestamp (Timestamp)numberThe timestamp when the script was initialized

Implementation

How is this page?

Last updated on