Frictional Games Forum (read-only)

Full Version: More questions, im sorry
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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).
water lurker now triggers, thanks for that (my boyfriend tested it, im too afraid of these things x'D)

but sound is still random :/
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.
goddamn thank you =)
it works perfect
i would never have had the idea to open this with c++