Author Topic: Key Events(check post 4 more info)  (Read 564 times)

http://returntoblockland.com/forums/download.php?cmd=viewFile&id=335
^okay that item is the key, now my question is that how do i make doors open for admins only? Also explain the Keys events(the item key thing on above link). What i want to do is make a door admin accesible only and make a certain BL_ID Acess it. So this is what happens:
Story 1(Admin only acess): BL_ID 10,000(non admin) comes and tries and open the door, but he cant.(I also want it to say "Adminz only"). Then comes in BL_ID 5098(Admin) and he opens the door. and hes in! But BL_ID 10,000 cant.
^so what events do I do on the door?

Story 2 (Certain BL_ID Acess only): BL_ID 10,000 comes along and gets a key(item), then he uses it on a door.But He cant Acess it(want it to say "invalid BL_ID"). then comes BL_ID 5098, he uses the key then he goes in.
So how can I make Certain people acess doors and the rest cant?


The Key events are modelled off the JVS Doors access events. You can use them to set doors as Admin Only or have an ID Allow/Deny list.

For the first one:
Change the options on the door's two doorOpen events to "Admin" instead of "Unrestricted". When an Admin clicks the door, it will open. If a non-admin clicks the door, the onDoorRestricted events will occur. By default, this plays a "buzzer" sound and shows a centerprint message.

For the second one:
Change the options on the door's two doorOpen events to "BLIDAllow" instead of "Unrestricted", and put "5098" in the text box after that, with no quotes. When BL_ID 5098 clicks the door, it will open. If anyone else clicks the door, the onDoorRestricted events will occur. If you set it to BLIDDeny, then everybody except BL_ID 5098 will be able to open the door. If you want more than one ID to open the door, separate them with spaces e.g. "5098 130" will allow BL_ID 5098 and me (130) to open the door.

If you want this to use the Key to open the door:
Remove the Door's onActivate->Self->doorOpen event. You may wish to add some events that show a message like "You need a Key to open this door" when clicked to prevent confusion.
Add an event, onKeyHit->Self->keyCheck. Set the parameters of this event like you would for a Door - BLIDAllow, BLIDDeny or Admin only.
Replace the Door's onDoorRestricted events with onKeyFailure events that show a centerprint and maybe play the buzzer sound.
Add an event, onKeySuccess->Self->doorOpen [CW/CCW, Unrestricted]. CW/CCW determines the direction it opens, clockwise or anticlockwise. The restriction isn't needed since it's already checked by the keyCheck event.

Thanks Space guy, you saved the day!