2020-12-12 16:55:22 +00:00
|
|
|
(local {: deflevel : say : itile} (require :game.defs))
|
|
|
|
(local {: ev} (require :game.entity))
|
|
|
|
(local level (deflevel "game/map5.json"))
|
|
|
|
(local vm level.vm)
|
|
|
|
|
2020-12-15 04:14:35 +00:00
|
|
|
(vm:var :doortimer 0)
|
|
|
|
(vm:word :start-doortimer 0x100 :doortimer :set)
|
|
|
|
(vm:word :doortimer-tick
|
|
|
|
:doortimer :get (vm:when
|
|
|
|
:doortimer :get 1 :- :dup :doortimer :set
|
|
|
|
:not (vm:when
|
|
|
|
:lit :timedswitch ev.deact :entity>do)))
|
|
|
|
|
|
|
|
(vm:word :do-timedswitch
|
|
|
|
; only gord is physically able to touch it
|
|
|
|
:dup ev.touch := (vm:when :start-doortimer :drop ev.act) :switch)
|
|
|
|
|
2020-12-12 16:55:22 +00:00
|
|
|
level
|