Fralexxelarf
Junior Member
Posts: 24
Threads: 5
Joined: Jan 2012
Reputation:
0
|
Cant get this function to work (sound)
Quote:void OnStart()
{
SetEntityPlayerInteractCallback("Key_1", "Scary_3_1", true);
}
void Scary_3_1(string &in entity)
{
SetEntityActive("Skull_1", true);
PlaySoundAtEntity("", "21_scream7.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
AddTimer("CabinetTimer",0.7, "Scary_3_2");
}
This is so weird cause all the other functions work but not the "PlaySoundAtEntity" , and I have used that script before, in the same map. Does anyone have an idea why it doesnt work?
(This post was last modified: 01-03-2012, 03:29 PM by Fralexxelarf.)
|
|
01-03-2012, 03:27 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Cant get this function to work (sound)
(01-03-2012, 03:27 PM)Fralexxelarf Wrote: Quote:void OnStart()
{
SetEntityPlayerInteractCallback("Key_1", "Scary_3_1", true);
}
void Scary_3_1(string &in entity)
{
SetEntityActive("Skull_1", true);
PlaySoundAtEntity("", "21_scream7.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
AddTimer("CabinetTimer",0.7, "Scary_3_2");
}
This is so weird cause all the other functions work but not the "PlaySoundAtEntity" , and I have used that script before, in the same map. Does anyone have an idea why it doesnt work? Did you restart the CS and try again?
|
|
01-03-2012, 03:43 PM |
|
Fralexxelarf
Junior Member
Posts: 24
Threads: 5
Joined: Jan 2012
Reputation:
0
|
RE: Cant get this function to work (sound)
yep, and i have no music in the background, this works though, after entering an area; Quote: PlaySoundAtEntity("", "12_girl_scream.snt", "Player", 0, false);
but if i replace it with 21_scream7 in my Quote:PlaySoundAtEntity("", "21_scream7.snt", "Player", 0, false);
it still doesnt sound when i pick up the key, is there something wrong with Quote:void Scary_3_1(string &in entity)?
here's an other sound script, the function works but the sound wont play;
Quote:
void OnStart()
{
AddEntityCollideCallback("Player", "Scary_Area_1", "Scary_1", true, 1);
}
void Scary_1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("Scary_1", "lurker_hit_wood1.snt", "player", 0, false);
AddPropImpulse("armour_nice_complete_1", 0, 0, 2, "world");
}
nevermind, the snt's were corrupt
(This post was last modified: 01-03-2012, 04:40 PM by Fralexxelarf.)
|
|
01-03-2012, 04:05 PM |
|
eagledude4
Member
Posts: 144
Threads: 14
Joined: Dec 2011
Reputation:
0
|
RE: Cant get this function to work (sound)
I've been having the same issue with:
PlaySoundAtEntity("big_clock_chime", "Custom\big_clock_chime.snt", "clock_grandfather_1", 0, false);
The file is located in redist/sounds/Custom, and is not corrupted.
Its hard to see the truth when you've been blinded by lies.
|
|
01-03-2012, 05:51 PM |
|
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
|
RE: Cant get this function to work (sound)
(01-03-2012, 05:51 PM)eagledude4 Wrote: I've been having the same issue with:
PlaySoundAtEntity("big_clock_chime", "Custom\big_clock_chime.snt", "clock_grandfather_1", 0, false);
The file is located in redist/sounds/Custom, and is not corrupted. The game will find the filename, no need to give it information about the folder location.
PlaySoundAtEntity("big_clock_chime", "big_clock_chime.snt", "clock_grandfather_1", 0, false);
|
|
01-03-2012, 06:17 PM |
|
eagledude4
Member
Posts: 144
Threads: 14
Joined: Dec 2011
Reputation:
0
|
RE: Cant get this function to work (sound)
(01-03-2012, 06:17 PM)Khyrpa Wrote: (01-03-2012, 05:51 PM)eagledude4 Wrote: I've been having the same issue with:
PlaySoundAtEntity("big_clock_chime", "Custom\big_clock_chime.snt", "clock_grandfather_1", 0, false);
The file is located in redist/sounds/Custom, and is not corrupted. The game will find the filename, no need to give it information about the folder location.
PlaySoundAtEntity("big_clock_chime", "big_clock_chime.snt", "clock_grandfather_1", 0, false);
Using your code, the sound still doesn't load.
Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-03-2012, 08:28 PM by eagledude4.)
|
|
01-03-2012, 08:28 PM |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: Cant get this function to work (sound)
also, the syntax was incorrect.
void Scary_3_1(string &in entity)
Should be:
void Scary_3_1(string &in asEntity)
Perhaps that will solve another issue that comes up.
|
|
01-03-2012, 09:12 PM |
|
eagledude4
Member
Posts: 144
Threads: 14
Joined: Dec 2011
Reputation:
0
|
RE: Cant get this function to work (sound)
My sound issue hasn't been resolved yet.
Its hard to see the truth when you've been blinded by lies.
|
|
01-05-2012, 02:27 AM |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: Cant get this function to work (sound)
(01-05-2012, 02:27 AM)eagledude4 Wrote: My sound issue hasn't been resolved yet. Have you torrented your amnesia or something? Be honest.
|
|
01-05-2012, 02:29 AM |
|
eagledude4
Member
Posts: 144
Threads: 14
Joined: Dec 2011
Reputation:
0
|
RE: Cant get this function to work (sound)
(01-05-2012, 02:29 AM)Statyk Wrote: (01-05-2012, 02:27 AM)eagledude4 Wrote: My sound issue hasn't been resolved yet. Have you torrented your amnesia or something? Be honest.
Yes I'd buy it if steam would let me use my debit card. I can get custom sounds to work through the level editor, just not through my script.
Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-05-2012, 02:34 AM by eagledude4.)
|
|
01-05-2012, 02:30 AM |
|
|