Author Topic: How to make a code lock door using VCE?  (Read 1494 times)


Well, there are many methods you could use.

The easiest way for you to do this is using VCE to set a specified variable of a player, which the door then checks, and outcomes determine what happens

Some Random Brick
Code: [Select]
[0] [Onactivate] [Client] [VCE_Modvariable] [Password] [Set] [1234]

Door
Code: [Select]
[0] [Onactivate] [Client] [VCE_Ifvariable] [Password] [==] [1234] [1 1]
[1] [Onvariabletrue] [Door] [Toggle]

But, if you want to actually type in a password, you could use event mods like CMD events or any one of the onplayermessage-like-events which come with some outputs to test if the password is correct, or you could get the password mod that adds some events specific for passwording for things like doors.

Lol, forgot I saw "VCE" in the title.  Your best bet for the fastest way of doing this is what I wrote out in code boxes.  The other stuff I typed down were methods I used in the past for more design-oriented approaches instead of gameplay-wise.



onActivate -> Self > VCE_ifValue [ <var:cl:lastteamMsg> == 6543 ]
onVariableTrue -> Self -> Door [ Toggle ]

Basically the first line checks if the last message sent via team chat is '6543'. So to enter the password, just open team chat and type it. Even if it says team chat is disabled and it doesn't show up, it will still work.

If you want a real in-game numpad, then make each number multiply your client's password by 10 and add the printed number. If you don't know how to do this, read the VCE manual.