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
Some complicated stuff!
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#6
RE: Some complicated stuff!

There is prolly better solutions for this one, but this will at least work.
When you want the health to stay at 20hp, call the healthtimer function, which is:

void healthtimer(string &in asTimer)
{
AddTimer("healthtimer", 5.0f, "healthtimer");
if (GetPlayerHealth() >= 20)
{
SetPlayerHealth(20.0f);
}
}

When you want the health to regain by itself again, just use RemoveTimer("healthtimer");

(Note that the healthtimer will not remove the auto regain of health, it will just modify the players' health so it will be near 20hp all the time.)
.
(07-29-2012, 10:11 PM)shadowZgamerZ Wrote: About 2) I mean that when player gets damage (about 80)- 100 - 80 = 20. So he has 20 energy left. I want to energy stay like that, i want it not to increase to 100 (full health - all good) again. So player cannot regain healt by just standing and waiting!
07-29-2012, 10:35 PM
Website Find


Messages In This Thread
Some complicated stuff! - by shadowZgamerZ - 07-29-2012, 08:55 PM
RE: Some complicated stuff! - by Mackiiboy - 07-29-2012, 10:00 PM
RE: Some complicated stuff! - by shadowZgamerZ - 07-29-2012, 10:11 PM
RE: Some complicated stuff! - by Mackiiboy - 07-29-2012, 10:13 PM
RE: Some complicated stuff! - by Mackiiboy - 07-29-2012, 10:35 PM
RE: Some complicated stuff! - by shadowZgamerZ - 07-29-2012, 10:20 PM
RE: Some complicated stuff! - by shadowZgamerZ - 07-29-2012, 10:49 PM
RE: Some complicated stuff! - by Mackiiboy - 07-29-2012, 11:00 PM
RE: Some complicated stuff! - by SilentStriker - 07-29-2012, 11:30 PM
RE: Some complicated stuff! - by shadowZgamerZ - 07-30-2012, 05:28 AM
RE: Some complicated stuff! - by SilentStriker - 07-30-2012, 11:48 AM
RE: Some complicated stuff! - by shadowZgamerZ - 07-30-2012, 12:00 PM
RE: Some complicated stuff! - by SilentStriker - 07-30-2012, 01:43 PM
RE: Some complicated stuff! - by shadowZgamerZ - 07-30-2012, 02:01 PM
RE: Some complicated stuff! - by Your Computer - 07-30-2012, 02:25 PM
RE: Some complicated stuff! - by SilentStriker - 07-30-2012, 02:28 PM
RE: Some complicated stuff! - by shadowZgamerZ - 07-30-2012, 04:35 PM
RE: Some complicated stuff! - by SilentStriker - 07-30-2012, 07:23 PM



Users browsing this thread: 1 Guest(s)