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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to breath heavily
Mooserider Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2011
Reputation: 2
#8
RE: How to breath heavily

Did you still include what you had written in your script? This is the final script you should have:

PHP Code: (Select All)
void OnStart(){
    
AddEntityCollideCallback("Player", "ScriptArea_3", "PlayerInBreathArea", false, 0);
    
ShowEnemyPlayerPosition("Grunty1");
    
AddUseItemCallback("", "Key_1", "castle_1", "KeyOnDoor", true);
    
AddEntityCollideCallback("Player", "ScriptArea_1", "CloseDoorFunc", true, 1);
    
AddEntityCollideCallback("Player", "ScriptArea_2", "CloseDoorFunc2", true, 1);
}
void PlayerInBreathArea(string &in asParent, string &in asChild, int alState)
{
    if (
alState == 1)
    {
        
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0.0f, false);
        
AddTimer("BreathTimer", 2.0f, "BreathTimer");
    }

    else
    {
    
RemoveTimer("BreathTimer");
    }
}
void BreathTimer(string &in asTimer)
{
    
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0.0f, false);
    
AddTimer("BreathTimer", 2.0f, "BreathTimer"); 
}
void CloseDoorFunc(string &in asParent, string &in asChild, int alState) 
{
SetSwingDoorClosed("castle_1", true, true);
SetSwingDoorLocked("castle_1", true, false);    
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(40.0f, true);
}

void CloseDoorFunc2(string &in asParent, string &in asChild, int alState) 
{
SetSwingDoorClosed("castle_2", true, true);
SetSwingDoorLocked("Magical Apples", true, false);    
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(40.0f, true);
}

void KeyOnDoor(string &in item, string &in door)
{
SetSwingDoorLocked("castle_1", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_1", 0, false);
RemoveItem("Key_1");
}

void OnEnter()
{

}



void OnLeave()
{

} 

Working on a FC: "Don't Let Go "
(This post was last modified: 06-24-2012, 09:43 AM by Mooserider.)
06-24-2012, 09:30 AM
Find


Messages In This Thread
How to breath heavily - by Jagsrs28 - 06-24-2012, 05:39 AM
RE: How to breath heavily - by Mooserider - 06-24-2012, 06:28 AM
RE: How to breath heavily - by Jagsrs28 - 06-24-2012, 06:43 AM
RE: How to breath heavily - by Mooserider - 06-24-2012, 06:48 AM
RE: How to breath heavily - by Jagsrs28 - 06-24-2012, 06:53 AM
RE: How to breath heavily - by Mooserider - 06-24-2012, 07:13 AM
RE: How to breath heavily - by Jagsrs28 - 06-24-2012, 07:18 AM
RE: How to breath heavily - by Mooserider - 06-24-2012, 09:30 AM



Users browsing this thread: 1 Guest(s)