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

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hungover Effect
Author Message
Loveridge Offline
Junior Member

Posts: 21
Joined: Nov 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
XxRoCkBaNdMaNxX Offline
Posting Freak

Posts: 1,119
Joined: Nov 2010
Reputation: 5
Post: #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 XxRoCkBaNdMaNxX.)
02-03-2012 01:54 AM
Find all posts by this user Quote this message in a reply
Streetboat Offline
Senior Member

Posts: 658
Joined: Mar 2011
Reputation: 26
Post: #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 all posts by this user Quote this message in a reply
Loveridge Offline
Junior Member

Posts: 21
Joined: Nov 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




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