Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Message on locked doors[SOLVED]
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#4
RE: Message on locked doors

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.


[Image: mZiYnxe.png]


05-16-2011, 09:14 PM
Find


Messages In This Thread
Message on locked doors[SOLVED] - by Greven - 05-16-2011, 06:14 PM
RE: Message on locked doors - by Acies - 05-16-2011, 06:22 PM
RE: Message on locked doors - by Greven - 05-16-2011, 08:11 PM
RE: Message on locked doors - by Acies - 05-16-2011, 09:14 PM
RE: Message on locked doors - by Russ Money - 05-16-2011, 09:24 PM
RE: Message on locked doors - by dragonlordsd - 05-17-2011, 02:36 AM



Users browsing this thread: 1 Guest(s)