Frictional Games Forum (read-only)

Full Version: Changing health and sanity at start?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a script for changing both the players health and sanity on start? If so, please share any information you have.
Nah, check out the post below. Smart guy

Below is my old post
Spoiler below!

The first map put this at the OnStart

SetPlayerSanity(float afSanity);
SetPlayerHealth(float afHealth);

The max is 100.


EXAMPLE
void OnStart
{
SetPlayerSanity(35);
SetPlayerHealth(50);
}

http://wiki.frictionalgames.com/hpl2/amn...ons#player

At:


Modifies/returns the sanity of the player.

void SetPlayerSanity(float afSanity);
void AddPlayerSanity(float afSanity);
float GetPlayerSanity();



Modifies/returns the health of the player.

void SetPlayerHealth(float afHealth);
void AddPlayerHealth(float afHealth);
float GetPlayerHealth();
Be sure to study the entire article that Statyk linked to, too.
Thanks all, I am really rusty at all of this so i appreciate all the help!