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
Door needs two keys script no effect
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#2
RE: Door needs two keys script no effect

You need an if statement that is called when the "KeysUsed" int has a value of 2. So it would be like this:

Keep your OnStart the same, but have this as your function:

void KeyCounter(string &in asItem, string &in asEntity)
{
AddLocalVarInt("KeysUsed", 1);
if(GetLocalVarInt("KeysUsed")==2)
{
SetSwingDoorLocked("mansion_3", false, true)
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
}
}


Also, there's no need to post a new thread about this. You already have one about this exact function. Just go back to it and post in it instead of starting another new topic.

03-16-2011, 05:52 AM
Find


Messages In This Thread
Door needs two keys script no effect - by Raymond - 03-16-2011, 05:36 AM
RE: Door needs two keys script no effect - by Anxt - 03-16-2011, 05:52 AM



Users browsing this thread: 1 Guest(s)