Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Trigger Sounds not working
Xallikk Offline
Junior Member

Posts: 35
Threads: 7
Joined: Jun 2016
Reputation: 0
#11
RE: Trigger Sounds not working

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

The ones at the front always die first...
06-04-2016, 11:10 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#12
RE: Trigger Sounds not working

(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)
(This post was last modified: 06-05-2016, 12:55 AM by Slanderous.)
06-05-2016, 12:55 AM
Find
Xallikk Offline
Junior Member

Posts: 35
Threads: 7
Joined: Jun 2016
Reputation: 0
#13
RE: Trigger Sounds not working

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

The ones at the front always die first...
06-05-2016, 12:59 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#14
RE: Trigger Sounds not working

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: (Select All)
PlaySound"asdf.snt" ... 
It won't find another asdf.snt.

06-05-2016, 04:32 AM
Find
Xallikk Offline
Junior Member

Posts: 35
Threads: 7
Joined: Jun 2016
Reputation: 0
#15
RE: Trigger Sounds not working

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?

The ones at the front always die first...
(This post was last modified: 06-05-2016, 04:46 AM by Xallikk.)
06-05-2016, 04:36 AM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#16
RE: Trigger Sounds not working

(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: (Select All)
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/am..._functions
06-05-2016, 10:58 AM
Find




Users browsing this thread: 1 Guest(s)