Blockland Forums > General Discussion
Zone brick event help?
boodals 2:
It works because:
--- Code: ---1) You step on the brick
2) All the events are 'Played'
3) The door opens
4) The events are canceled (Stops nothing, because they were 'played' by the same input)
5) Your still touching it, so the events are 'Played' again (200ms delay between 'Play's)
6) The door opens, but its already open, so nothing happens
7) The ContentStop event (From last touch) gets canceled by the newer CancelEvents
8) Repeat 5-7 untill you get off the brick
9) The door opens (Already open)
10) The ContentStop event doesnt get canceled, so the door closes.
11) Your not touching it, so the events arnt played any more.
--- End code ---
Its hard to explain, but that should more or less cover it.
phflack:
--- Quote from: iHeartSega on November 18, 2010, 03:53:10 AM ---EDIT: Okay, your idea works, after disabling the 'onContentStarted' line on the door...
Oh, I've literally just worked it out now; So when you're on the platform, because the delay on the contentstop is above that of contentstart and cancelevents, it loops contentstart while on it? like ">Recognizes onplayertouch>sends contentstart>cancelsevents>starts again"? But I'm still not sure on how stepping off the platform would just disable the cancelevents line and go straight to contentstop... It confuses me. :/
--- End quote ---
clear all opening/closing events on the door... i figured you would do that so you can't just click it
boodals, 200ms delay doesn't work, and if it does, it's glitchy with lag, even 500 is borderline i find, so i tend to use 750 or 1000