Frictional Games Forum (read-only)
[SCRIPT] Trigger Sounds not working - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Trigger Sounds not working (/thread-48972.html)

Pages: 1 2


RE: Trigger Sounds not working - Xallikk - 06-04-2016

It's located outside the room the player spawns in. They are not touching or even very close to each other.


RE: Trigger Sounds not working - Slanderous - 06-05-2016

(06-04-2016, 11:10 PM)Xallikk Wrote: It's located outside the room the player spawns in. They are not touching or even very close to each other.

Is the script that you've provided the whole .hps file of your map? Also, do you perhaps have a monster on your map that's activated all the time from the start of the game? (just simply placed down, without scripting him)


RE: Trigger Sounds not working - Xallikk - 06-05-2016

Yeah that's the whole script and I don't have any monsters on the map.


RE: Trigger Sounds not working - Daemian - 06-05-2016

Keep in mind that almost -if not all- every enemy in Amnesia have a notice.snt.
So if you don't specify which notice.snt you wanna play, the game it's gonna use the first it finds.
If you don't rename the .snt to something else you can include the parent(s) directory of the sound to differentiate. Example: ambient/1/notice.snt.
Or you can make a copy of the .snt and name it something else, it will still point to the correct sound(s).
example notice.snt > you make a copy in your cs and name it: asdf.snt
Then you go:
PHP Code:
PlaySound"asdf.snt" ... 
It won't find another asdf.snt.


RE: Trigger Sounds not working - Xallikk - 06-05-2016

But that wouldn't affect when it plays would it?

Alright I got it to work, so now I'm wondering if there is a way to make the player freak out when they after the sound is triggered, like a gasp and a sanity flicker thing. Is that possible?


RE: Trigger Sounds not working - Slanderous - 06-05-2016

(06-05-2016, 04:36 AM)Xallikk Wrote: But that wouldn't affect when it plays would it?

Alright I got it to work, so now I'm wondering if there is a way to make the player freak out when they after the sound is triggered, like a gasp and a sanity flicker thing. Is that possible?

PHP Code:
void GiveSanityDamage(float afAmountbool abUseEffect);
Reduces the sanity of the player.

afAmount amount of sanity damage done
abUseEffect 
determines whether an effect is played when the sanity damage is dealt 

Here's a list of all the script functions, hope it's useful.

https://wiki.frictionalgames.com/hpl2/amnesia/script_functions