My apologies; most of that was off the top of my head, which apparently isn't as reliable as I once thought : /
This will work, tested 100% (note, this still requires the step mentioned about the level editor):
void PhonographScare(string &in EntityName, int alState)
{
if(alState == 1) ///revised int alCount to int alState
{
PlaySoundAtEntity("", "TipToeSong.ogg", "phonograph_1", 5.0f, false);
SetPropStaticPhysics("phonograph_1", true);
}
}
That will fix your error. I noticed you have a .ogg file though I think PlaySound requires a .snt file. Make sure you converted it to a .ogg properly by using a program such as Audacity and didn't just rename an mp3 file; anyways, I'm pretty sure you will need to make a .snt file for it to work properly; then again, its 6:11 am here and that could be the sleep deprivation talking
Here's the easiest way to make your own:
-Choose
any .snt file from the sounds folder (I suggest 00_creak.snt, found in the 00 sound folder)
-Open it with NotePad++ or Geany
-Change the sound file under "Main" from "00_creak" to the corresponding name of your .ogg file.
Next, you may want to fix some of the properties; most notably, you will want to set**:
"Volume="float" volume, I believe max is 1.0f
MinDistance="int" an integer (not decimal) is the minimum distance you must be to hear it
MaxDistance="Int" an integer the max distance to hear it; this should be at least 20/30
Loop="bool" loop means replay, true will replay, false will not
You can explore some of the other settings, most of which won't have major effects on the sound; I just went over the most basic properties.
**Change int to corresponding integers (i.e. 1,2,3,4), floats to corresponding decimal values (i.e. 1.0, 0.76, 0.245), and bool to true or false values.
I rate it 3 memes.