CoolGuyZ65
Junior Member
Posts: 10
Threads: 1
Joined: Jan 2012
Reputation:
0
|
RE: CoolGuyZ65 TC help thread
(01-16-2012, 01:16 AM)Apjjm Wrote: Your callback function is called "KeyOnDoor" but you passed in "UseKeyOnDoor" into the AddUseItemCallBack code. Try the following.
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Storage_Key", "storage_1", "UseKeyOnDoor", true);
}
void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("storage_1", false);
PlaySoundAtEntity("", "unlock_door", "storage_1", 0, false);
RemoveItem("Storage_Key");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Thanks man this really helped!
|
|
01-16-2012, 05:57 PM |
|