Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Sound File isn't working?
Author Message
MissMarilynn Offline
Member

Posts: 74
Joined: Oct 2011
Reputation: 0
Post: #1
Sound File isn't working?
void ClockScare(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("explosion", "explosion_rock_large.snt", "clock_grandfather_1", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
StartScreenShake(1, 1.0f, 0.5f, 5.0f);
GiveSanityDamage(5.0f, true);
}

Everything else works except the sound. :/

Just to check: What is suppose to go in the clock_grandfather_1 space? I put an entity...is it suppose to be an area?
01-10-2012 01:58 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #2
RE: Sound File isn't working?
No, you can put it on anything that is an entity. I can't see anything wrong with it. May be trying to put it on Player instead of the grandfather clock?

01-10-2012 02:16 AM
Find all posts by this user Quote this message in a reply
Statyk Offline
Modmau5

Posts: 3,601
Joined: Sep 2011
Reputation: 198
Post: #3
RE: Sound File isn't working?
Also make sure the grandfather clock's name matches the one in the script. If it helps, try putting it attached to the "Player", if the sound doesn't play, it could be a name issue or a resource issue (refresh Amnesia by restarting it).

01-10-2012 02:50 AM
Visit this user's website Find all posts by this user Quote this message in a reply
MissMarilynn Offline
Member

Posts: 74
Joined: Oct 2011
Reputation: 0
Post: #4
RE: Sound File isn't working?
I put the clock_grandfather_1 as player.

You two are amazing. It works! Thank you both Smile
01-10-2012 03:30 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #5
RE: Sound File isn't working?
(01-10-2012 02:50 AM)Statyk Wrote:  refresh Amnesia by restarting it).
Yeh, sounds need for you to restart amnesia (or go to the main menu) for them to take affect.

01-10-2012 03:32 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)