Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 4 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anyone need help?
Author Message
Kyle Offline
Posting Freak

Posts: 911
Joined: Sep 2010
Reputation: 7
Post: #41
RE: Anyone need help?

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

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

05-09-2011 12:51 AM
Find all posts by this user Quote this message in a reply
Ge15t Offline
Junior Member

Posts: 48
Joined: Feb 2011
Reputation: 0
Post: #42
RE: Anyone need help?

Yeah it still doesnt work. I might just give up on it for the moment. A new question though, if i use
FadePlayerFOVMulTo(float afX, float afSpeed);
, how do I return to normal FOV? I have tried AddTimer but that doesnt seem to work
05-09-2011 02:26 AM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 911
Joined: Sep 2010
Reputation: 7
Post: #43
RE: Anyone need help?

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. :/

05-09-2011 02:37 AM
Find all posts by this user Quote this message in a reply
Ge15t Offline
Junior Member

Posts: 48
Joined: Feb 2011
Reputation: 0
Post: #44
RE: Anyone need help?

Should have posted my script:
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
05-09-2011 02:44 AM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 911
Joined: Sep 2010
Reputation: 7
Post: #45
RE: Anyone need help?

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]
}

05-09-2011 03:05 AM
Find all posts by this user Quote this message in a reply
masken94 Offline
Junior Member

Posts: 5
Joined: May 2011
Reputation: 0
Post: #46
RE: Anyone need help?

How do I get a screen effect like when the camera zoom fast, so it's scares the player.
05-09-2011 09:57 AM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 911
Joined: Sep 2010
Reputation: 7
Post: #47
RE: Anyone need help?

(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);

05-09-2011 10:52 AM
Find all posts by this user Quote this message in a reply
Dominic0904 Offline
Member

Posts: 63
Joined: Apr 2011
Reputation: 0
Post: #48
RE: Anyone need help?

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.
05-09-2011 11:01 AM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 911
Joined: Sep 2010
Reputation: 7
Post: #49
RE: Anyone need help?

You're going to have to repeat it.

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;
}
}

(This post was last modified: 05-09-2011 11:13 AM by Kyle.)
05-09-2011 11:12 AM
Find all posts by this user Quote this message in a reply
Dominic0904 Offline
Member

Posts: 63
Joined: Apr 2011
Reputation: 0
Post: #50
RE: Anyone need help?

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))
05-09-2011 11:46 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)