Frictional Games Forum (read-only)

Full Version: Hungover Effect
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Okay, on the OnStart put this (If you want to be dizzy when you FIRST enter the map)

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

Then put this anywhere else

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


That should do it!
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
(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