02-08-2012, 05:29 PM
Hey all, i would like to know how you play the soundfile of the screaming man already got the sound file for it. ( already got the corpse male to appear when picking up the note too ). This is what i got so far:
Code:
////////////////////////////
// Run when entering map
void OnStart()
{
AddUseItemCallback("", "key1", "mansiondoor1", "open", true);
SetEntityCallbackFunc("offensiveletter", "OnPickup");
}
void open(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansiondoor1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansiondoor1", 0, false);
RemoveItem("key1");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("man1", true);
PlaySoundAtEntity("", "15_the_big_scream1", "Player", 0, false);
}