Bloody Trapland 2: Curiosity

Bloody Trapland 2: Curiosity

Not enough ratings
Game Editor
By Chrius and 1 collaborators
This is an in-depth guide for using the Editor.
It will be updated over time however as there are many features to go through.
   
Award
Favorite
Favorited
Unfavorite
Toolbox


In order, the tool-icons are the following:

Select
Your basic tool to select objects. Click any object in the scene with this tool active to select it, you will notice that the inspector window will change to the selected object.

To select many objects at once you can either right-click drag or ctrl+click them one by one.

All the objects in the current layer will show as a red-dot in the scene when select tool is active.

If multiple objects is placed on top of eachother, you can click the same spot more than once to pick an object bellow.

Move
Moves the selected objects. Note that you can also move objects between layers. Simply click them to start moving, then change to the desired layer and click again to place them in the new layer.

Create
Creates a new object, either pickone from the palette, or click any object in the scene to make a simple copy of it.

9-Tile
Opens the 9-Tile window. With this tool you simply click and drag to create big chunks of platforms. If you place two chunks of platforms created with the 9 tile next to eachother, they will merge.

Fill
Creates many objects at once by left click-draging.

Duplicate
Right click any object in the scene to make a deep copy of it (copies all the object-settings).
Can also be used to duplicate many at once, simply use the select tool as described above then right click one of the selected objects to duplicate them all.

Prefabs
Usercreated prefabs. This is where you can create and save pre-defined chunks of objects. Select the once you want to make into a prefab, the enter a name and press save. Prefabs carries over between different levels too.

Other than that you have:

Grid
Toggles grid on and off.

Pixel snap
Changing this value will make the objects snap at diffrent locations, setting the value to "1" will remove the snap.
Hotkeys: Shift + 1,2,3,4

Depth filter
Filters out all objects with none matching depth value. Can be toggled on and off.

Type filter
Toggle on and off to show all the object with the corresponding "Type" that's selected in the type-dropdown. Select tool needs to be active.

Collision
Toggle on and off to highlight all objects with a collision in the selected layer.
Layers


The game scene consists of 7 layers. Think of them as pictures stacked on top of eachother.
"3" being the foreground, 0 being the "player layer" and "-3" being the background.


All objects in the scene is placed in one of these layers. By having the select tool active and swapping between the layers you will see a red dot, indicating that they are in the active layer.

All object also has a "depth" value which can be changed in the inspector window. This will determine which objects that will be in front of another when in the same layer.

The layer also determines which sub-palette that will be active in the palette window.

To only show objects in the currently selected layer, toggle the "Fade Layers", and adjust the amount to fade them out by dragging the slider.
Custom scripting
This part will be way more extensive with examples later on, but for now, here is the BTLScript interface. You can find a few examples within the games script templates and existing levels.

public class BTLScript : AfterGame { //Called when script is initalized public override void Initialize() //Unique nerwork identifier public int NetworkID //Fetches the value from the inspect of the given key public string GetValue(int key) //Sets collision type public void SetCollisionType(CollisionEnum type) //Adds a timer that will call the given function withing give time, supports a lot of cases like loop, tick callbacks, delays etc. public Delegator AddTimer(onFinishedReturn _Trigger = null, float _Delay = 1, bool _Loop = false, object _Linked = null, Tick _Tick = null, float _TickTime = 0, Start _Start = null, float _delayedStart = 0) //Registers with the Listener for a callback on event public void AddListener(string name, onEvaluateEvent callBackFunction) //Unregisters the callback from the Listener public void RemoveListener(string name, onEvaluateEvent callBackFunction) //Make this object destroyable by explosions public void isExplosive(bool state) //Explodes the object public virtual void Explode() //Adds a collision check for players public void AddCollisionCheck(PlayerCollison OnStayCallback, PlayerCollison OnEnter = null, PlayerCollison OnExit = null) //Removed collision check for players public void RemoveCollisionCheck(PlayerCollison callback) //Main update loop public override void GameUpdate(float dt) //Sets the worldposition by floats public override void setPosition(float WorldX, float WorldY) //Sets the worldposition by Vector2 public override void setPosition(Vector2 Position) //Fetches the current network time public float NetworkTime //Gets a child with the given name public GameObject GetChild(string name) //Makes the childs static, if true blood will be stained public void SetChildsAsStatic(bool state) //Triggers the Listener for given key public void TriggerListener(string name, DataContainer DataContainer = null) //Sets world position using a Vector3 protected virtual void SetPosition(Vector3 newPosition) //Sets local position using a Vector3 protected virtual void SetLocalPosition(Vector3 newPosition) //Sets the world rotation in degrees protected virtual void SetRotation(float newRotation) //Adds a rotation amount in degrees public virtual void AddRotation(float rotationAmount) //Sets the local rotation in degrees protected virtual void SetLocalRotation(float newRotation) //Plays a particle with given name protected virtual ParticleSystem PlayParticle(string name) //Plays a particle with given name at position protected virtual ParticleSystem PlayParticle(string name, Vector2 position) //Sets the scale protected virtual void SetScale(float x, float y) //Checks if current player is host or not online. protected bool IsMaster() //Gets a particle by name and position without playing it protected virtual ParticleSystem GetParticle(string name, Vector2 position) //Stops audio from being played on this script protected virtual void StopAudio() //Hooks a function to a button in the level protected Button HookButton(string name, System.Action<bool> callback) }