So let’s start off with the basics.. What is the logic system? The logic system is used to make things happen in the level you are creating, whether that means opening a gate as you approach it or getting the “Level completed” effect as you destroy a specific object. It basically allows players to script events in the game without any programming or coding knowledge. So how does it work? The Logic System works very simply, first you create a Trigger and then you create an Event that occurs when the Trigger is activated, for example if an object is destroyed the level is completed. The best way for me to explain how the logic system works is by showing you, so I’m going to run through a couple of examples here to explain how it all comes together! Example One - Destroy The Village I thought we’d start with the most basic example possible, one which features in Besiege’s First level, where the player must destroy some buildings to complete the level. So first we need to design our level layout. Here's one I made earlier… The goal of this level will be to destroy the 3 buildings in this peaceful farming hamlet. I will therefore need to edit each of the building’s logic to add progression towards completing the level when they’re destroyed. Using the “Modify” tool in the Level Editor Panel, I select one of the buildings like and click the Logic tab. As you can see, the house currently has no logic attached to it. I want a bit of the level’s progress bar to be filled up when this building is destroyed so I’ll need to add a Trigger with an Event attached to it. The Trigger will be the building being destroyed and the Event will be the Progression Bar partially filling up. To add this logic to the object I start by clicking the “+ ADD EVENT TRIGGER” button. This has now added a Trigger to the object and allows me to create one or more Events attached to said Trigger. Notice at the bottom I can also create more Triggers with their own events attached to them if I so wish. Next, I need to decide the type of trigger I want to use for this bit of logic, the default one is “ON ACTIVATE” which isn’t what we need so I hover over it with my house and use the side arrows to cycle through until I get to the trigger I need “ON DESTROY”. Now that I have the correct trigger selected I can add an event that will happen if the building is destroyed, so I click the “+ ADD EVENT” button and select “Increase Progress”. If there was only one building in the level I would change the Increase Progress event to increase the bar by 100% but my level has 3 buildings and I want them all to be destroyed before the level can be completed, therefore I’ve set the progress to be 34% (To ensure we don’t get stuck at 99% progress) for destroying this house. I then add the same logic to the other buildings in my level and I’m done! Now when the player destroys all the buildings in my village the level is completed! Example Two - Destroy Opponent This next example is for a multiplayer PVP battle between two players. The Multiverse update has an optional damage system for machines which allows you to display health bars above machines and use logic to pronounce a winner of PVP Battles. First I create two Build Zones. Next I’m going to assign each Build Zone to a specific team, one to the red team and the other to the green team. When a player selects a build zone (or is placed in one upon joining the server) they are automatically assigned to the team that Build Zone belongs to. To assign the Build Zones to different teams I open select the MODIFY tool, from the level editor panel, and click on them. At the bottom of the newly opened window I can select the team which the Build Zone belongs to. Once the Build Zones are assigned to different teams I need to add a bit of logic to them for my game mode to work. Under the Logic tab I create a new Trigger and set the type to ON MACHINE DAMAGE. This trigger’s event is activated when the machine from this Build Zone takes the specified amount of damage. I’ve set the damage value to to be 50% rather than 100% because I feel requiring the player to destroy every single block and joint could be tedious. I feel if a machine has taken 50% damage it’s probably disabled enough to give the other player victory. Next I need to add an event to this trigger. I want the event to be that the opposing player wins the game if this player’s machine takes 50% damage, so I will set the event to be INCREASE PROGRESS and set the value to be 100% We also need to set which team should gain progression if the event is triggered. We do this by clicking the little person icon until its the colour we need, which is red for the green team's build zone and green for the red team's build zone. Once I’ve applied this logic to both boundary boxes it should result in one player winning the game if their opponent takes 50% damage. The logic system can be a very powerful tool for you to create complex levels with dynamic environments and interesting game modes. The examples given in this guide are very basic but in the future I hope to give more advanced uses of the logic system to create game modes such as football or king of the hill, and intractable levels with traps or puzzles. The Logic editor is a powerful tool and we can’t wait to see what you guys create with it!