Trying to make a sound play as the player touches an entity. Areas don't seem to work so I'm resorting to using a patch-o-blood entity as my trigger.
OnEnter part:
////////////////////////////
// Run when entering map
void OnEnter()
{
{
AddEntityCollideCallback("Player" , "blood" , "bloodscare" , true, 0);
}
}
and the voidfunctions:
////////////////////////////
// Actual functions
void bloodscare(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_animal_squeal.snt", "Player", 0.0f, false);
AddDebugMessage("Sound Trigger Activated.", false);
}
I'm not really sure why it doesn't trigger. If someone could alternatively tell me how to make script_area's trigger events that would be nice too. Any help is appreciated.