Frictional Games Forum (read-only)
More questions, im sorry - 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: More questions, im sorry (/thread-11933.html)



More questions, im sorry - Quotentote - 12-18-2011

Im almost done with my first part of my first sory.

only 2 things left that causes me headache -.-*

1. my waterlurker is a bit lazy and dont want to get triggered:
PHP Code:
void OnStart()
{
AddEntityCollideCallback("Player""wassermonster1""wasser"true1);
}
void wasser(string &in asEntitystring &in type)
{
  
SetEntityActive("wassermonster"true);
  
ShowEnemyPlayerPosition("wassermonster");


2nd thing is my goddamn sound problem x(

PHP Code:
void looking(string &in asParentstring &in asChildint alState)
{
   
    
StartPlayerLookAt("lookto"1050"");
    
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false);
    
PlaySoundAtEntity("""react_scare.snt""Player"0false);
    
PlaySoundAtEntity("""15_the_big_scream.snt""Player"0false);
    
GiveSanityDamage(5.0ftrue);
    
AddTimer(""2"TimerStopPlayerLook");


the soundfile '15_the_big_scream.snt' is so random... the whole script works fine...but these sounds.... really random...
for example:
1st testing it works properly
2nd testing i wasnt even near to the area and i heard it.
i just want to hear it ONE time when i ENTER the script area^^

thanks for the help



RE: More questions, im sorry - palistov - 12-18-2011

Parameters for a function called by an entity collision are (string, string, int), where as your 'wasser' function uses the parameters (string, string). Basically, the function is never being executed.

Change wasser's parameters to (string &in parent, string &in child, int state).


RE: More questions, im sorry - Quotentote - 12-18-2011

water lurker now triggers, thanks for that (my boyfriend tested it, im too afraid of these things x'D)

but sound is still random :/



RE: More questions, im sorry - palistov - 12-19-2011

I looked at the sound file. It's a looping, long distance file. Create a copy of the 15_the_big_scream.snt file and rename it quotentote_big_scream or something easy to remember. Right click it, and open it with notepad or some text editor. Change MaxDistance to 30. Change Loop to False. Save it, and then make a copy of your new snt file and paste it into your custom story's sounds folder. Then modify the script to play this sound instead.


RE: More questions, im sorry - Quotentote - 12-19-2011

goddamn thank you =)
it works perfect
i would never have had the idea to open this with c++