only tick nonwaiting objects
This commit is contained in:
+2
-6
@@ -40,9 +40,6 @@ fn init(me) {
|
||||
// tick() runs. Queue.length() avoids piling up moves; blocked() avoids walking
|
||||
// into a wall (or another object's already-queued move this tick).
|
||||
fn tick(me, dt) {
|
||||
if !me.waiting { dance(me); }
|
||||
}
|
||||
fn dance(me) {
|
||||
move(East);
|
||||
move(South);
|
||||
move(North);
|
||||
@@ -183,10 +180,9 @@ fn tick(me, dt) {
|
||||
# A trigger script: no glyph, not solid — it just watches for the player stepping
|
||||
# onto its cell and logs. Triggers are placed via [[boards.NAME.triggers]].
|
||||
tripwire = """
|
||||
fn tick(me, dt) {
|
||||
if Player.x == me.x && Player.y == me.y && !me.waiting {
|
||||
fn enter(me, dir) {
|
||||
if Player.x == me.x && Player.y == me.y {
|
||||
log("tripwire: the player crossed here");
|
||||
me.delay(2.0);
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user