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
2 keys script
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: 2 keys script

(12-06-2011, 04:33 PM)Kainzor Wrote: no i mean....not same door.... how do you script with 1 key ea door by havin 2 keys like.... i got mansion_1 and mansion_2, i got key_1 and key_2, i know how to script the first key but there's always and error whn i do the 2nd 1 ..... i know my scripting must be wrong but i cant find it.... so i deleted it and tried have help on this website
Okay do this:

PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""bedroomkey_1""mansion_1""UsedKeyOnDoor1"true);
AddUseItemCallback("""bedroomkey_2""mansion_2""UsedKeyOnDoor2"true);
}

void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("mansion_1"falsetrue);
PlaySoundAtEntity("""unlock_door""mansion_1"0false);
RemoveItem("bedroomkey_1");
}

void UsedKeyOnDoor2(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("mansion_2"falsetrue);
PlaySoundAtEntity("""unlock_door""mansion_1"0false);
RemoveItem("bedroomkey_2");



Also rename the doors and keys to the right names. And you can always post your script int the forums to get some insight on how to correct the problem. :3

(This post was last modified: 12-06-2011, 04:41 PM by flamez3.)
12-06-2011, 04:39 PM
Find


Messages In This Thread
2 keys script - by Kainzor - 12-06-2011, 03:56 PM
RE: 2 keys script - by flamez3 - 12-06-2011, 04:04 PM
RE: 2 keys script - by Kainzor - 12-06-2011, 04:33 PM
RE: 2 keys script - by flamez3 - 12-06-2011, 04:39 PM
RE: 2 keys script - by Kainzor - 12-06-2011, 05:04 PM
RE: 2 keys script - by Your Computer - 12-06-2011, 05:24 PM
RE: 2 keys script - by flamez3 - 12-06-2011, 05:32 PM
RE: 2 keys script - by Dobbydoo - 12-07-2011, 03:23 PM
RE: 2 keys script - by flamez3 - 12-07-2011, 03:25 PM
RE: 2 keys script - by Dobbydoo - 12-07-2011, 03:32 PM



Users browsing this thread: 5 Guest(s)