Add running (no energy support).

This commit is contained in:
Major-
2013-11-03 04:53:57 +00:00
parent da92f6dcc0
commit 03216e1893
2 changed files with 31 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
WALK_BUTTON_ID = 152
RUN_BUTTON_ID = 153
on :button, WALK_BUTTON_ID do |player|
player.set_running(false)
end
on :button, RUN_BUTTON_ID do |player|
player.set_running(true)
end
on :command, :run do |player, command|
running = player.is_running
player.set_running(!running)
player.send_message(running ? "You are now running." : "You are no longer running.")
end