This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pushing [2022/12/15 16:22] – justin | pushing [2022/12/18 17:18] (current) – justin | ||
---|---|---|---|
Line 1: | Line 1: | ||
======Pushing====== | ======Pushing====== | ||
---- | ---- | ||
- | |||
- | (WIP) | ||
- | |||
The **pushing** mechanic allows [[character|characters]] to push and pull [[object|objects]] onto other [[tile|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 [[tile|tiles]] in order to open a door. | The **pushing** mechanic allows [[character|characters]] to push and pull [[object|objects]] onto other [[tile|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 [[tile|tiles]] in order to open a door. | ||
- | =====Setting Up Pushable | + | =====Setting Up a Pushable |
Add the [[object]] that you want to be pushable to an open [[tile]] on your [[map]]. | Add the [[object]] that you want to be pushable to an open [[tile]] on your [[map]]. | ||
Line 16: | Line 13: | ||
{{: | {{: | ||
- | Switch to Edit mode (F2), then double-click the [[object]] to open the [[Entity Properties]] panel. From the [[Entity Properties]] panel, enable the " | + | Switch to Edit mode (F2), then double-click the [[object]] to open the [[Entity Properties]] panel. From the [[Entity Properties]] panel, enable the " |
+ | |||
+ | Set the desired movement speed for the [[object]]. The movement speed is measured in [[voxel|voxels]] per second and determines how fast a [[character]] will move when pushing or pulling the [[object]]. | ||
+ | |||
+ | 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 " | ||
{{: | {{: | ||
- | Set the desired movement speed for the [[object]]. The movement speed is measured in [[voxel|voxels]] per second, similar to the movement speed of [[character|characters]]. This speed determines how the | + | Once the [[object]] is configured to be pushable, the player will be able to grab onto it from an adjacent |
- | If the pushable | + | {{: |
+ | |||
+ | =====Animation===== | ||
+ | When a [[character]] pushes | ||
=====Scripting===== | =====Scripting===== | ||
- | If desired, you can trigger events to occur as the player interacts with the [[object]] in various ways. There are [[tile]] [[script|scripts]] that can be triggered when a pushable [[object]] enters, exits, or stops on a [[tile]], as well as[[global event scripts]] that are triggered when a [[character]] grabs, pushes, or releases an [[object]]. | + | If desired, you can trigger events to occur as the player interacts with the [[object]] in various ways. There are [[tile]] [[script|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]]. |
+ | |||
+ | {{: | ||
+ | |||
+ | As an example, the [[script]] below could be assigned to the " | ||
+ | |||
+ | <code bauxite> | ||
+ | replace_navigation(self, | ||
+ | play_animation($object, | ||
+ | </ | ||
=====Game Controls===== | =====Game Controls===== |