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


Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with script
Khan Offline
Member

Posts: 61
Threads: 12
Joined: Aug 2011
Reputation: 0
#7
RE: Need help with script

(08-21-2011, 12:25 PM)lanlord000 Wrote:
(08-21-2011, 04:33 AM)Khan Wrote: You dont need two OnLeave's. everything that happens will be above the Onleave.

Void OnStart()
{
AddUseItemCallback("", "roomkey_1", "mansion_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "roomkey_2", "mansion_3", "UsedKeyOnDoor_2", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("roomkey_1");
}
void UsedKeyOnDoor_2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("roomkey_2");
}

void OnLeave()
{

}

That should work.

first it gave me an error but then i changed the Void to void and it worked

woops, accidently put a capital V.
(This post was last modified: 08-21-2011, 12:53 PM by Khan.)
08-21-2011, 12:53 PM
Find


Messages In This Thread
Need help with script - by lanlord000 - 08-21-2011, 01:41 AM
RE: Need help with script - by Tanshaydar - 08-21-2011, 01:50 AM
RE: Need help with script - by lanlord000 - 08-21-2011, 02:23 AM
RE: Need help with script - by Elven - 08-21-2011, 02:26 AM
RE: Need help with script - by Khan - 08-21-2011, 04:33 AM
RE: Need help with script - by lanlord000 - 08-21-2011, 12:25 PM
RE: Need help with script - by Khan - 08-21-2011, 12:53 PM



Users browsing this thread: 2 Guest(s)