Author Topic: Zone brick event help?  (Read 771 times)

First of all, sorry if this is in the wrong section, I wasn't sure where to put it.

I have an idea for an event, but I'm unsure on how to get it to work. So how would I:

Set it so if a brick is in a 'Zone brick' it will activate the events on another brick.
    
Example: You have to put a brick on another brick(The zone brick) to open a door.

I'm pretty sure with would be possible, I just don't know how. :)

That! And I'd like to know the same, but with a player. So the door opens when a player stands on a certain brick.(Pretty simple) but closed when the player steps off it.(Thats the hard part)
« Last Edit: November 17, 2010, 10:36:27 PM by iHeartSega »

zones can't detect bricks, and you can't put bricks in bricks, although you can put bricks in zones, and zones detect players, vehicles, and bots

That! And I'd like to know the same, but with a player. So the door opens when a player stands on a certain brick.(Pretty simple) but closed when the player steps off it.(Thats the hard part)
this one is actualy easier
onplayertouch>namedbrick>contentstart
onplayertouch>namedbrick>contentstop (delay this by a value >= 500)
onplayertouch>self>cancelevents

zones can't detect bricks, and you can't put bricks in bricks, although you can put bricks in zones, and zones detect players, vehicles, and bots
this one is actualy easier
onplayertouch>namedbrick>contentstart
onplayertouch>namedbrick>contentstop (delay this by a value >= 500)
onplayertouch>self>cancelevents
thank him for helping you...

why would i thank them for asking a question?
and if you're saying for them to thank me, maybe they haven't seen this yet, as funnily enough, the world doesn't revolve around you, and so things do not update when you look at them

why would i thank them for asking a question?
and if you're saying for them to thank me, maybe they haven't seen this yet, as funnily enough, the world doesn't revolve around you, and so things do not update when you look at them

Yes, I've only just seen it. Thank you for the help. So there is no way for a brick to detect another brick as of yet?

I don't quite understand the event you gave me, the delay on 'contentstop' will just cause the door to close after 500 milliseconds? not when the player stops touching the brick?

Could you please tell me how this works? I'll try it now though. Thanks again.

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. :/
« Last Edit: November 18, 2010, 04:08:19 AM by iHeartSega »

It works because:

Code: [Select]
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.

Its hard to explain, but that should more or less cover it.

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. :/
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