Frictional Games Forum (read-only)
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)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


RE: Anyone need help? - Kyle - 05-09-2011

There is no possible way "asTimer" can equal "area_step_6". Try this:

if (asTimer == "step6")
{
PlaySoundAtEntity("", "scare_breath.snt", "Player", 0, false);
}


RE: Anyone need help? - Ge15t - 05-09-2011

Yeah it still doesnt work. I might just give up on it for the moment. A new question though, if i use
Code:
FadePlayerFOVMulTo(float afX, float afSpeed);
, how do I return to normal FOV? I have tried AddTimer but that doesnt seem to work


RE: Anyone need help? - Kyle - 05-09-2011

If you're trying to figure out the original FOV, try 75 for the float afX, or just keep incrementing it by 5 until you get the right number.

If that's not what you want, then tell me what else. :/


RE: Anyone need help? - Ge15t - 05-09-2011

Should have posted my script:
Code:
void HallucinationCallback(string &in asParent, string &in asChild, int alState)
{

    SetEntityActive("EnemyHallucination_1", true);
    SetEnemyDisableTriggers("EnemyHallucination_1", true);
    AddEnemyPatrolNode("EnemyHallucination_1", "HallucinationPath_1", 1, "");
    StartPlayerLookAt("EnemyHallucination_1", 10.0f, 10.0f, "");
    AddTimer("", 2.0f, "stoplook2");
    PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
    PlaySoundAtEntity("", "guardian_activated.snt", "Player", 0, false);
    StartScreenShake(0.02, 1, 0.5, 1);
    FadePlayerFOVMulTo(0.7, 1);

So this works fine but i need a function to return to normal FOV.. maybe an if statement? Not sure.. im not too good with if's


RE: Anyone need help? - Kyle - 05-09-2011

You should add a timer when you want it to return to normal.

AddTimer("", 3, "NormFOV");

void NormFOV(string &in asTimer)
{
[set the FOV to normal]
}


RE: Anyone need help? - masken94 - 05-09-2011

How do I get a screen effect like when the camera zoom fast, so it's scares the player.


RE: Anyone need help? - Kyle - 05-09-2011

(05-09-2011, 09:57 AM)masken94 Wrote: How do I get a screen effect like when the camera zoom fast, so it's scares the player.

There are multiple way you can do that.

You could have:

PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
GiveSanityDamage(30, true);


RE: Anyone need help? - Dominic0904 - 05-09-2011

Quick question, how would I get the player to say pant or breath slowly for a certain about of time after a Sanity event?
For example lets say I gave the sanity damage after a script_area trigger. How would I script it so the player would breathe slowly ((but you can hear it)) or pant for say...10-15 seconds? Because I know that the sound file does not loop, it only has the one or two seconds of breathing.


RE: Anyone need help? - Kyle - 05-09-2011

You're going to have to repeat it.

Code:
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Function01", true, 1);
}
void Function01(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(30, true);
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
AddTimer("Sound1", 3, "Function02");
AddTimer("Sound2", 6, "Function02");
AddTimer("Sound3", 9, "Function02");
AddTimer("Sound4", 12, "Function02");
}
void Function02(string &in asTimer)
{
if (asTimer == "Sound1")
{
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
return;
}
else if (asTimer == "Sound2")
{
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
return;
}
else if (asTimer == "Sound3")
{
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
return;
}
else if (asTimer == "Sound4")
{
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
return;
}
}



RE: Anyone need help? - Dominic0904 - 05-09-2011

Cheers I'll give it a try and see what happens! Smile

((Yes I am totally milking this help thread as much as I can Tongue))