Voxel Game Maker

Docs Cookbook

Moving platform

Place the platform. What is it? ▸ Platform (Advanced: Moving platform).

#Without code

  1. Place the platform. What is it? ▸ Platform (Advanced: Moving platform).
  2. Set Moves X (tiles), Moves up (levels) (an elevator) or Moves Z (tiles).
  3. Set Seconds each way and Waits at the ends (s).
  4. Moves: all the time, when stood on, or while a switch is on (then fill Switch).

The player standing on it rides along.

#Quick code

Where it goes: on the platform, Event: Player enters the world.

while self.exists do
  self.move(4, 0, 0, 2)
  wait(1)
  self.go_home(2)
  wait(1)
end

Code-moved objects don't carry the player; use the Moving platform behavior for rides.