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
Changing health and sanity at start?
Cocomunches Offline
Junior Member

Posts: 36
Threads: 6
Joined: Apr 2012
Reputation: 1
#1
Changing health and sanity at start?

Is there a script for changing both the players health and sanity on start? If so, please share any information you have.
05-08-2012, 01:20 AM
Find
Xanthos Offline
Senior Member

Posts: 318
Threads: 9
Joined: Mar 2012
Reputation: 8
#2
RE: Changing health and sanity at start?

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


(This post was last modified: 05-08-2012, 01:25 AM by Xanthos.)
05-08-2012, 01:21 AM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#3
RE: Changing health and sanity at start?

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();
(This post was last modified: 05-08-2012, 01:22 AM by Statyk.)
05-08-2012, 01:21 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Changing health and sanity at start?

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

Tutorials: From Noob to Pro
05-08-2012, 01:24 AM
Website Find
Cocomunches Offline
Junior Member

Posts: 36
Threads: 6
Joined: Apr 2012
Reputation: 1
#5
RE: Changing health and sanity at start?

Thanks all, I am really rusty at all of this so i appreciate all the help!
05-08-2012, 01:30 AM
Find




Users browsing this thread: 1 Guest(s)