Stepper321
Senior Member
Posts: 263
Threads: 26
Joined: Nov 2011
Reputation:
8
|
RE: Declared thing is not declared
void OnStart()
{
AddUseItemCallback("", "key_door_1", "door1", "OpenDoor", true);
AddUseItemCallback("", "key_door_1", "door1", "KillStephano", true);
}
void OnEnter()
{
}
void OnLeave()
{
}
void OpenDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(item);
}
void KillStephano(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("StephanoDeath", "StephanoDeath.snt", "barrel01_1");
}
void BarrelExcuse ()
{
}
I have made some additions to your script, if you want to open a door now. Just use this one at onStart:
AddUseItemCallback("", "KEYNAMEHERE", "DOORNAMEHERE", "OpenDoor", true);
Just put the keyname at KEYNAMEHERE and doorname at DOORNAMEHERE to open the door with any key .
ALSO.
It needs to be .snt, if you want to know how to make custom sounds. Check this:
http://wiki.frictionalgames.com/hpl2/tut...cript/page
Signature to awesome to be displayed.
|
|
05-30-2012, 09:07 PM |
|