Frictional Games Forum (read-only)
Changing health and sanity at start? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Changing health and sanity at start? (/thread-15333.html)



Changing health and sanity at start? - Cocomunches - 05-08-2012

Is there a script for changing both the players health and sanity on start? If so, please share any information you have.


RE: Changing health and sanity at start? - Xanthos - 05-08-2012

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);
}




RE: Changing health and sanity at start? - Statyk - 05-08-2012

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions#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();


RE: Changing health and sanity at start? - Your Computer - 05-08-2012

Be sure to study the entire article that Statyk linked to, too.


RE: Changing health and sanity at start? - Cocomunches - 05-08-2012

Thanks all, I am really rusty at all of this so i appreciate all the help!