User Tools

Site Tools


pushing

This is an old revision of the document!


Pushing


(WIP)

The pushing mechanic allows characters to push and pull objects onto other tiles. This is a great way to include puzzles in your game! For example, a room could be set up where the player needs to move one or more boxes onto specific tiles in order to open a door.

Setting Up Pushable Objects

Add the object that you want to be pushable to an open tile on your map.

Ensure “Interact Only” navigation paths are connected from the object's tile to any adjacent tiles. This will allow the player to interact with the object, while also preventing them from walking through it.

Switch to Edit mode (F2), then double-click the object to open the Entity Properties panel. From the Entity Properties panel, enable the “Pushable” option. This will allow the player to grab onto the object from an adjacent tile. When an object is configured as pushable, you'll see a hand icon above it as shown.

Set the desired movement speed for the object. The movement speed is measured in voxels per second, similar to the movement speed of characters. This speed determines how the

If the pushable object should be restricted to, or prohibited from, certain tile types, you can make use of the terrain types option to do so. If the default option of “All” is used, the pushable object will be able to be pushed/pulled onto any tile (assuming the appropriate navigation paths exist).

Scripting

If desired, you can trigger events to occur as the player interacts with the object in various ways. There are tile scripts that can be triggered when a pushable object enters, exits, or stops on a tile. You can find more details about these events on the Entity Properties page. There are also global event scripts that are triggered when a character grabs, pushes, or releases an object.

Game Controls

In-game, pushable objects can be controlled with either the mouse or keyboard (assuming both control types are enabled for your game).

To grab onto the object, either left-click on it or press “G” while standing on an adjacent tile. You can release it by either left-clicking on it again or pressing “G” again.

To push or pull the object with the keyboard, move the player character towards or away from it, respectively. To push the object with the mouse, left-click on an open tile in front of it onto which it can be moved. To pull the object with the mouse, left-click on an open tile behind it onto which the player character can walk. When pushing or pulling with the mouse, you can click on any tile in a straight line in front of the object as long as the entire path to that tile is open.

pushing.1671150415.txt.gz · Last modified: 2022/12/15 16:26 by justin