Anyone need help? - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Anyone need help? (/thread-7825.html) |
RE: Anyone need help? - Ge15t - 05-08-2011 Code: void ScaryFootstepsCallback(string &in asParent, string &in asChild, int alState) Ok so this script works, BUT the footsteps sound like they are coming from the player or really close by, how can I fix that? also, the PlaySoundAtEntity("", "scare_breath.ogg", "Player", 0, false); doesnt work either.. any tips? The game loads fine btw RE: Anyone need help? - RawkBandMan - 05-08-2011 (05-08-2011, 10:59 PM)Kyle Wrote: Inside of the function "Function01", it set the entity, the monster, "Monster" to true, thus spawning it. Okay thank you very much! RE: Anyone need help? - Simpanra - 05-08-2011 but thats what i said! xD you just used the actual script while i was using a mock up script =) RE: Anyone need help? - Dominic0904 - 05-08-2011 (05-08-2011, 10:46 PM)Kyle Wrote: Simpanra, I don't know why you are even trying to help him, you just screwed it all up, no offence. :p Hey I did what you put there and replaced with my sound and script area names. But when i enter the script area. The sanity damage is given, but the sound is not played. This is how my code looks so far: Code: void OnStart() The reason I got all those StopSound(s) is because I needed to stop the sounds from playing as soon as I load the map up. Since I need them to be triggered later. RE: Anyone need help? - Kyle - 05-08-2011 Oops. A my bad on my part. It should be: PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false); The react_scare.snt is an actual file under sounds, and then react. You can try out sounds and see what sounds each one makes by going into the editor and clicking on the sound tab, and click on the "..." and then chose a sound file (.snt) and play it by pressing the play arrow there. Just to let you know. RE: Anyone need help? - Dominic0904 - 05-08-2011 Oh, so I don't need to place down sound entities? I just need to say where the sound is coming from (this example would be "Player") and then write out the actually file name? RE: Anyone need help? - Kyle - 05-09-2011 (05-08-2011, 11:59 PM)Dominic0904 Wrote: Oh, so I don't need to place down sound entities? I just need to say where the sound is coming from (this example would be "Player") and then write out the actually file name? That is correct. It is also best to preload the sound with: PreloadSound(""); with the sound file inside the quotes. (05-08-2011, 11:06 PM)Ge15t Wrote: The "PlaySoundAtEntity" only works with .snt files. In this case, it would be "PlaySoundAtEntity("", "scare_breath.snt", "Player", 0, false);" I don't know about the footsteps sounding too close to the player. Just try placing them farther away? :p RE: Anyone need help? - Dominic0904 - 05-09-2011 Thanks dude! I'll post here again if I want to know anything else (First I'll try and figure it out myself though! ) RE: Anyone need help? - Kyle - 05-09-2011 You're welcome, anytime. It's funny how I'm helping people on the forums and scripting my custom story at the same time. RE: Anyone need help? - Ge15t - 05-09-2011 (05-09-2011, 12:04 AM)Kyle Wrote:(05-08-2011, 11:59 PM)Dominic0904 Wrote: Oh, so I don't need to place down sound entities? I just need to say where the sound is coming from (this example would be "Player") and then write out the actually file name? It still doesnt work after trying that. Footstep noises are good though. Is the script right? Because game loads fine, but ignores the sound file at the end. |