It displays the message when variable "LevelLockedX" is set to 0 (which it is by default).
When using a key on it however, that variable is set to 1. Thus interaction after unlocking will no longer display the message.
Note that this is for a leveldoor and not a swingdoor, so if you are using a swingdoor replace the "SetLevelDoorLocked("level_wood_2", false);" with the swingdoor command.
ジ
(This post was last modified: 05-16-2011, 06:22 PM by Acies.)
Uhm, I could explain it better - or copy you OnStart() parts too. Right now I can't think of another way.
The "if" part says:
Spoiler below!
if(GetLocalVarInt("LevelLockedX")==0)
{
//Then do stuff
return;
}
if(GetLocalVarInt("LevelLockedX")==0)
The GetLocalVarInt is a command which checks a variable, VarInt meaning it's a number without decimals.
The "LevelLockedX" is the name, which I have made up (you can name it whatever you want.)
The "==0" part means equal to zero.
I am using this variable as a bool, 0 means true / 1 means false. Thus if the variable is equal to 0 the door is considered locked and if it is equal to 1 it is considered unlocked.
The "//Then do stuff" part is only done IF "LevelLockedX" = 0, otherwise nothing is done.
When using the key on the door the variable is set to 1 and therefore when you interact with the door, nothing is done.