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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Scares
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#25
RE: Random Scares

void PlrCollideSwitch(string &in asParent, string &in asChild, int alState)
{
    int RandomScare = RandInt(1, 5);
    switch(RandomScare)
    {
    case 1:
    //Scare 1
        GiveSanityDamage(40, true);
        PlaySoundAtEntity("scarecase1", "scare_breath.snt", "Player", 3.0f, False);
        break;
    case 2:
    //Scare 2
        {
        AddEntityCollideCallback("Player", "scarecase2", "Push", true, 1);
        }
        void Push(string &in asParent, string &in asChild, int alState)
            {
            GiveSanityDamage(40, true);
            PlaySoundAtEntity("", "react_pant.snt", "push", 0, false);
            AddPlayerBodyForce(30000, 0, 0, false);
            }
        break;
    case 3:
    //Scare 3
        {
        AddEntityCollideCallback("Player", "scarecase3", "Throw", true, 1);
        }
        void Throw(string &in asParent, string &in asChild, int alState)
            {
            GiveSanityDamage(40, true);
            AddPropForce("throwhelmet", -28.5, 4, 6, "mylordscurse_1");
            }
        break;
    case 4:
    //Scare 4
        GiveSanityDamage(40, true);
        PlaySoundAtEntity("scarecase4", "scare_walk_hallway.snt", "Player", 3.0f, False);
        break;
    case 5:
    //Scare 5
        GiveSanityDamage(40, true);
        SetPlayerCrouching(True);
        FadeSepiaColorTo(10, 3.0f);
        PlaySoundAtEntity("scarecase5", "react_scare.snt", "Player", 3.0f, False);
        break;
    }
}

Fixed.

"Veni, vidi, vici."
"I came, I saw, I conquered."
05-17-2013, 12:19 PM
Find


Messages In This Thread
Random Scares - by PutraenusAlivius - 04-16-2013, 03:10 PM
RE: Random Scares - by Yare - 04-16-2013, 03:39 PM
RE: Random Scares - by PutraenusAlivius - 04-17-2013, 06:10 AM
RE: Random Scares - by Yare - 04-17-2013, 12:44 PM
RE: Random Scares - by PutraenusAlivius - 04-17-2013, 12:51 PM
RE: Random Scares - by Yare - 04-17-2013, 01:55 PM
RE: Random Scares - by VeNoMzTeamHysterical - 04-17-2013, 02:04 PM
RE: Random Scares - by FlawlessHappiness - 04-18-2013, 11:11 AM
RE: Random Scares - by PutraenusAlivius - 04-18-2013, 11:58 AM
RE: Random Scares - by Your Computer - 04-18-2013, 12:10 PM
RE: Random Scares - by Adrianis - 04-18-2013, 12:40 PM
RE: Random Scares - by Your Computer - 04-18-2013, 01:00 PM
RE: Random Scares - by CarnivorousJelly - 04-19-2013, 05:57 AM
RE: Random Scares - by Adrianis - 04-19-2013, 09:45 AM
RE: Random Scares - by Adrianis - 04-18-2013, 01:11 PM
RE: Random Scares - by FlawlessHappiness - 04-20-2013, 09:42 AM
RE: Random Scares - by Adrianis - 04-20-2013, 08:23 PM
RE: Random Scares - by FlawlessHappiness - 04-23-2013, 06:48 PM
RE: Random Scares - by PutraenusAlivius - 04-24-2013, 08:24 AM
RE: Random Scares - by Adrianis - 04-24-2013, 04:56 PM
RE: Random Scares - by RurouniMori - 05-07-2013, 04:22 AM
RE: Random Scares - by PutraenusAlivius - 05-17-2013, 12:19 PM
RE: Random Scares - by FlawlessHappiness - 04-24-2013, 04:50 PM
RE: Random Scares - by PutraenusAlivius - 05-07-2013, 04:30 AM
RE: Random Scares - by RurouniMori - 05-07-2013, 04:47 AM
RE: Random Scares - by Adrianis - 05-20-2013, 06:49 PM
RE: Random Scares - by PutraenusAlivius - 05-21-2013, 02:19 AM
RE: Random Scares - by GoreGrinder99 - 07-21-2013, 11:22 AM
RE: Random Scares - by PutraenusAlivius - 07-21-2013, 11:30 AM
RE: Random Scares - by GoreGrinder99 - 07-21-2013, 11:50 AM
RE: Random Scares - by PutraenusAlivius - 07-21-2013, 12:27 PM



Users browsing this thread: 4 Guest(s)