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
Need help!!! Script...
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Need help!!! Script...

Use this:
Quote:void OnEnter()
{
void AddUseItemCallback("", "cellkey_1", "celldoor_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("celldoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "celldoor_1", 0, false);
RemoveItem("cellkey_1");
}

////////////////////////////
// Run when Leaving map
void onleave
{
}
The mistakes were that you used a captiel T in true, you didn't put the other quotation mark on UsedKeyOnDoor in void onEnter. Some other mistakes you made in the rest of the script were missing quotations from RemoveItem("cellkey_1");, you also didn't name your function right.. If that doesn't work post it again.

(This post was last modified: 12-22-2011, 02:36 PM by flamez3.)
12-22-2011, 02:36 PM
Find


Messages In This Thread
Need help!!! Script... - by jessehmusic - 12-22-2011, 02:01 PM
RE: Need help!!! Script... - by flamez3 - 12-22-2011, 02:36 PM
RE: Need help!!! Script... - by jessehmusic - 12-22-2011, 02:53 PM
RE: Need help!!! Script... - by flamez3 - 12-22-2011, 03:07 PM
RE: Need help!!! Script... - by jessehmusic - 12-22-2011, 03:19 PM
RE: Need help!!! Script... - by Unearthlybrutal - 12-22-2011, 03:30 PM
RE: Need help!!! Script... - by jessehmusic - 12-22-2011, 04:54 PM
RE: Need help!!! Script... - by Unearthlybrutal - 12-22-2011, 05:04 PM
RE: Need help!!! Script... - by jessehmusic - 12-22-2011, 05:11 PM
RE: Need help!!! Script... - by jessehmusic - 12-22-2011, 06:54 PM
RE: Need help!!! Script... - by Unearthlybrutal - 12-22-2011, 09:48 PM



Users browsing this thread: 4 Guest(s)