Besiege Guide

Besiege | Simple Logic Tutorial | By Birdy for Besiege

Besiege | Simple Logic Tutorial | By Birdy

Overview

Beginner friendly. This guide shows what the logic of Besiege is like and defines all logic bricks.

Introduction

Hello, everybody. Today I want to publish a tutorial: “How do the logic components in Besiege work?” I’m doing this tutorial to explain in a simple way how the logic modules behave. I hope it helps some people.

First of all, it is important to understand that there is no difference between a farmer and a cube. Both are “objects”.

Logic has the following reason: To add advanced functions to the game objects. For example, to create the level: “when the player destroys a house and it fills the progress bar with it.”

It is also important to know that some objects can be divided into teams (see “Settings” below) If two different people have the same team, they will not fight each other. To set a player into a team, open the settings of the building zone.

A very interesting object is for example the “trigger”. It is the physical connection between itself and events.

So lets start.

Triggers

Each object has a logic tab. When we enter that tab, there are 4 main “Triggers”:

On level start


The “On level start” trigger is triggered when the player starts the simulation.

On activate


The “On activate” trigger is triggered when the respective object is activated by another object.

On deactivate


The “On deactivate” trigger is triggered when the object deactivates itself or by another object.

On variable


The “On variable” trigger is triggered when the entered variable (see right) matches a defined value. (See left). It is also possible to select “smaller than” and “larger than” as trigger by clicking on the “=” symbol.

Objects often have other triggers. The house, for example, has additional triggers to for example increase the progress bar when you destroy it.

Events

Under the name of one of these trigger you can now select different reactions, “events”.

Activate


The Activate event stands for the reactivation of a game object. Not only the optical visibility is activated: the logic of the selected object can now also be executed again.

Deactivate


The Deactivate event stands for the deactivation of a game object. Not only the optical visibility is deactivated: the logic of the selected object is now also blocked. For example, an object that deactivates itself cannot reactivate itself.

Increase Progress


The Increase progress event stands for filling the progress bar of a particular team. If the process reaches 100%, the team wins with 100%.
It is important to know here:
Negative variables are also possible. So you can also subtract progress.

Reload Player


The event “Relaod player” stands for the reloading of ammunition on the machine of the respective target. If you increase the number of ammo by 10, the player still only gets one ball for each cannon. The stock of crossbows is actually increased by +10.

Repeat


The event “Repeat” stands for repeating the event within the trigger for x-times. By default, the action is repeated infinitely often. If things are strange with this event, it is sometimes useful to add a “Wait” event.

Wait


The event “Wait” stands for the delay of the further execution of the event chain within the trigger. It is sometimes important, for example, to animate things.

Reset


The “Reset” event stands for resetting an object by resetting the position, damage and logic of the object to its original point. In combination with a damage trigger, a wait and the reset described here can respawn objects after a certain time.

Respawn Player


The event “Respawn player” stands for resetting a player by resetting the position and damage of the machine to its original position.

Transform


The event “Transform” is one of the most complex. To move an object, there are 3 types of movement possibilities:
-> Instant
The object immediately moves relative to its position in the direction and rotation you specified.

-> Duration (xs)
The object moves in the direction and rotation you specified in the specified time (xs) relative to its position.

-> The object is pushed in the direction and rotation by a force for as long as specified. The weight of the object also plays a role. If the object has no physics, “Force” does not move it.

Victory


You declare the team the winner with a certain condition (selection).

Modify Variable


The “Modify variable” event stands for changing a specific variable to a trigger. Watch your step: Upper and lower case and spelling errors may be sources of errors. It is usually important for larger projects with a lot of logic. Important note: If you click on the”=” symbol you also get the possibility to add or remove a certain quantity to the current variable.

Randomize Variable


The event “randomize variable” stands for replacing, adding or subtracting a random number from a selected range. This makes gambling possible, for example.

End

Thank you.

I hope this tutorial helped you to better understand the logic. If you have further questions, write in the comments what you want to ask.
~Birdy

SteamSolo.com