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
Hungover Effect
Loveridge Offline
Junior Member

Posts: 21
Threads: 8
Joined: Nov 2011
Reputation: 0
#1
Hungover Effect

Hey Smile I have no idea where to go with this but in a map we are currently working on you wake up in a wine celler and we want the player to be dizzy at the start as if having a horrible headache but i need it so that when you reach a certain area the effects will where off. Any ideas?

Much Appreciated (Y)

Joe - GamingFtLols
02-02-2012, 11:26 PM
Find
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#2
RE: Hungover Effect

Okay, on the OnStart put this (If you want to be dizzy when you FIRST enter the map)

GiveSanityDamage(80.0f, false);
AddEntityCollideCallback("Player", "scriptarea_1", "nomoredizzy", true, 1);

Then put this anywhere else

void nomoredizzy(string &in asParent, string &in asChild, int alState)
{
GiveSanityBoost();
GiveSanityBoost();
GiveSanityBoost();
GiveSanityBoost();
}


That should do it!

I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
(This post was last modified: 02-03-2012, 01:54 AM by RawkBandMan.)
02-03-2012, 01:54 AM
Find
Streetboat Offline
Posting Freak

Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation: 56
#3
RE: Hungover Effect

GiveSanityBoost will give you the blue screen effect, which may seem odd as a hangover wearing off. If you want a gradual cooldown, have several areas with EntityCollideCallBacks, and have each one use SetPlayerSanity(float afSanity), going higher and higher in number. That way it'll wear off gradually, and there will be no blue flashy effect. Smile

[Image: signature-2.png]
02-03-2012, 04:45 AM
Find
Loveridge Offline
Junior Member

Posts: 21
Threads: 8
Joined: Nov 2011
Reputation: 0
#4
RE: Hungover Effect

(02-03-2012, 04:45 AM)Streetboat Wrote: GiveSanityBoost will give you the blue screen effect, which may seem odd as a hangover wearing off. If you want a gradual cooldown, have several areas with EntityCollideCallBacks, and have each one use SetPlayerSanity(float afSanity), going higher and higher in number. That way it'll wear off gradually, and there will be no blue flashy effect. Smile
Why Thank you Both (Y) Smile
02-04-2012, 04:04 PM
Find




Users browsing this thread: 2 Guest(s)