Frictional Games Forum (read-only)
Scripting fatal errors? - 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: Scripting fatal errors? (/thread-18772.html)

Pages: 1 2 3 4 5 6 7 8 9


RE: Scripting fatal errors? - Rapsis - 08-07-2013

(08-07-2013, 11:21 AM)Kreekakon Wrote:
(08-07-2013, 11:18 AM)Rapsis Wrote: But I'm using a sound already included in-game, I don't think I should change it.
Well, you could make a copy of the sound file along with its .snt, give them different names, and put it along with your other custom story files. That way you can alter them without any fear of messing with the main game.

Tried that, and the sound doesn't work at all now:

<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="breathrun.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="1" MaxDistance="10" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="True" Use3D="True" Blockable="True" BlockVolumeMul="0.7" Priority="0" />
</SOUNDENTITY>

this used to work before; I'll try tinkering with it later, I'm going out.


RE: Scripting fatal errors? - Rapsis - 08-07-2013

Nope, can't figure it out. Here's the script and the soundentity:
Code:
void OnStart()
{
    PlaySoundAtEntity("breathrun.ogg", "breathrun.snt", "Player", 1, false);
    PreloadSound("breathrun.snt");
}


Code:
<SOUNDENTITY>
  <SOUNDS>
      <Main>
          <Sound File="breathrun.ogg" />
      </Main>
  </SOUNDS>
  <PROPERTIES Volume="1" MinDistance="1" MaxDistance="10" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="True" Use3D="True" Blockable="True" BlockVolumeMul="0.7" Priority="0" />
</SOUNDENTITY>



RE: Scripting fatal errors? - The chaser - 08-07-2013

(08-07-2013, 03:12 PM)Rapsis Wrote: Nope, can't figure it out. Here's the script and the soundentity:
Code:
void OnStart()
{
    PlaySoundAtEntity("breathrun.ogg", "breathrun.snt", "Player", 1, false);
    PreloadSound("breathrun.snt");
}


Code:
<SOUNDENTITY>
  <SOUNDS>
      <Main>
          <Sound File="breathrun.ogg" />
      </Main>
  </SOUNDS>
  <PROPERTIES Volume="1" MinDistance="1" MaxDistance="10" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="True" Use3D="True" Blockable="True" BlockVolumeMul="0.7" Priority="0" />
</SOUNDENTITY>

Code:
void OnStart()
{
    PlaySoundAtEntity("breathrun", "breathrun.snt", "Player", 1, false);
    PreloadSound("breathrun.snt");
}



Try this script, perhaps it works.


RE: Scripting fatal errors? - Rapsis - 08-07-2013

(08-07-2013, 03:20 PM)The chaser Wrote: Try this script, perhaps it works.

I literally copy/pasted it into my script and it still doesn't work.


RE: Scripting fatal errors? - The chaser - 08-07-2013

Is there any .map_cache file in your map? In that case, delete it. If that doesn't work, I'm out of ideas...


RE: Scripting fatal errors? - Rapsis - 08-07-2013

(08-07-2013, 03:33 PM)The chaser Wrote: Is there any .map_cache file in your map? In that case, delete it. If that doesn't work, I'm out of ideas...

Nope, no map cache. What's weird is that I've done the same thing before on another map and it worked.





Wow, only that one specific sound doesn't play. It was react_breath. What the hell?





Can someone explain why why that specific sound doesn't work while every other one does?!? It's so annoying!

Wow, I'm going to fucking explode. I've been trying to fix this piece of shit for at least 4 hours with no fucking avail. Why can't it fucking work right!?


RE: Scripting fatal errors? - Rapsis - 08-07-2013

Alright, I got it to fucking work, but it's not looping. I guess I'll try making a fucking timer or some shit like that

I fucking did it. I'm a motherfucking genius.

How do I make the StartEffectFlash stay at white for longer? afFadeIn doesn't seem to be doing anything at all, and afFadeOut changes how fast it both fades in AND out.