Voxel Game Maker

Docs Cookbook

Sprint with stamina

Game Settings ▸ Player: give Stamina a maximum, then set Running costs /s and Stamina regen /s.

#Without code

  1. Game Settings ▸ Player: give Stamina a maximum, then set Running costs /s and Stamina regen /s.
  2. Tick Show the stamina bar.
  3. Run speed (tiles/s) sets how fast a sprint is.

#Quick code

Where it goes: on a stamina pickup, Event: Player touches / steps on it.

add_max("stamina", 25)
popup("More stamina!")
self.remove()