The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#1
If players health is below x, y happens

So I want my player to die "instantly" when hit by a specific monster. And before you ask, no, I will not adjust the settings of the monster in the model editor. I want it to be script only. So I had an idea. If the players health is below 99 (100 is the default right?) it will activate setplayerhealth(0);. But unfortunately, I am terrible with the "if" stuff. What I have right now is

void A(Syntax stuff here)
{
if ((getplayerhealth)==<99)
{
Setplayerhealth(0);

}

It comes up with an expression value error.

Please ignore the spelling errors, the missing syntax and the missing capitals, I am writing this on my pone because my internet doesn't work on my pc anymore.
07-21-2012, 02:20 PM
Find


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



Users browsing this thread: 1 Guest(s)