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
If players health is below x, y happens
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: If players health is below x, y happens

Here's what I made; a timer that checks the players health every 0.2f to see if its less than or equal to 99.


void OnStart()
{
AddTimer("", 0.2f, "CheckHealth");
}

void CheckHealth(string &in asTimer)
{
AddTimer("", 0.2f, "CheckHealth");

if(GetPlayerHealth() <= 99.0f)
{
SetPlayerHealth(0.0f);
}

}

I rate it 3 memes.
07-21-2012, 02:36 PM
Find


Messages In This Thread
RE: If players health is below x, y happens - by Adny - 07-21-2012, 02:36 PM



Users browsing this thread: 1 Guest(s)