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
Script Help AddUseItemCallback and PlayerInteractCallback not working
Stepper321 Offline
Senior Member

Posts: 263
Threads: 26
Joined: Nov 2011
Reputation: 8
#5
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 Smile.



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
Find


Messages In This Thread
RE: Declared thing is not declared - by craazyy1 - 05-30-2012, 08:57 PM
RE: Declared thing is not declared - by Damascus - 05-30-2012, 08:59 PM
RE: Declared thing is not declared - by Stepper321 - 05-30-2012, 09:07 PM
RE: Declared thing is not declared - by craazyy1 - 05-30-2012, 09:54 PM
RE: Declared thing is not declared - by craazyy1 - 05-30-2012, 10:00 PM



Users browsing this thread: 3 Guest(s)