03-01-2011, 12:48 AM
Hello everyone, i'm pretty new to scripting / amnesia editing in general and there's one thing im confused about right now.
I have a fairly basic map set up right now with some basic scripts being used, and i realized i wanted to add some noises to my environment
So far i have tried these methods:
- Placing a "Sound" from within the level editor. (No matter how much i tweaked the sound's settings, i could never hear it in-game)
- Creating a script area in the level editor, and then scripting a collidecallback so that it would play a sound from a nearby entity.
This is what my script looked like:
void OnStart()
{
AddEntityCollideCallback("Player", "monsterscare1", "CollideAreaTest01", true, 1);
}
void CollideAreaTest01(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "enabled.snt", "sloped_square_shelf_1", 6.0f, false);
AddDebugMessage("Entered area!", false);
}
Thanks in advance to anyone that can help!
I have a fairly basic map set up right now with some basic scripts being used, and i realized i wanted to add some noises to my environment
So far i have tried these methods:
- Placing a "Sound" from within the level editor. (No matter how much i tweaked the sound's settings, i could never hear it in-game)
- Creating a script area in the level editor, and then scripting a collidecallback so that it would play a sound from a nearby entity.
This is what my script looked like:
void OnStart()
{
AddEntityCollideCallback("Player", "monsterscare1", "CollideAreaTest01", true, 1);
}
void CollideAreaTest01(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "enabled.snt", "sloped_square_shelf_1", 6.0f, false);
AddDebugMessage("Entered area!", false);
}
Thanks in advance to anyone that can help!