Hello I have just started making my own custom story, and i have a problem with scripting.
I just want to make so that a sound plays on a entity (player in this case) when i pick up a key, but nothing happens!
Here is the code:
void OnStart()
{
SetEntityCallbackFunc("key_study_1", "Break");
}
void Break(string &in asEntity, string &in type)
{
SetPropHealth("barrel01_2", 0.0f);
SetPropHealth("barrel01_3", 0.0f);
SetPropHealth("barrel01_4", 0.0f);
SetPropHealth("barrel01_1", 0.0f);
StartPlayerLookAt("human_skull_1", 5, 5, "Break2");
PlaySoundAtEntity("", "react_scare.snt", "Player", 2, false);
}
Thanks for your help