Besiege Wiki
Advertisement
Besiege Wiki

Every logic event and chain must have an Event Trigger to set it off. Different logic events can be triggered via different event triggers.

Finding the logic page[]

How to start programming
  1. Click on the tool icon on the editor menu, and then click an object with it.
  2. Click the "Logic" page on the top right of the object menu.
  3. Click "+ Add Event Trigger"


Event Triggers[]

Common logics

Different objects have different default event triggers, but the most common ones are listed as follows:

On Level Start[]

When the level starts, the logic events below will be triggered.

On Activate[]

When the object is currently deactivated, activate it will trigger the logic events below "On Activate".

On Deactivate[]

When the object is currently activated, deactivate it will trigger the logic events below "On Deactivate".

On Variable[]

When the value of a variable fits the "On Variable" 's setting, the logic events below this trigger event will be triggered.

Global mode variables won't trigger Local mode trigger events and vice versa.


Special Event Triggers[]

As well as the four common ones, there are other event triggers for different uses.

On Death[]

Knight trigger event

Only for anything that dies, especially the NPCs.

When NPC dies, the following events will start running.

Example: Knight.


On Ignite[]

House trigger event

Only for anything that can be set on fire.

When the object is lit, the following events will start running.

Exmple: Cottage.


On Destroy[]

Only for anything that can be destroyed.

When the object is destroyed, the following events will start running.


On Explode[]

Bomb trigger event

Only for anything that can explode or be destroyed by an explosion, including sheep and chickens.

Example: Bomb.


On Enter & On Exit[]

Only for triggers and Insignias, when the set target(s) enters, the following events will start running.

Here's how to select the target:

Enter trigger

There can be multiple ways of choosing the targets:

Trigger target list


Advertisement