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
Script Help [FIXED] "If get player health" function?
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#3
RE: "If get player health" function?

(05-12-2016, 06:59 PM)Romulator Wrote: I believe you check Player Health this way;

PHP Code: (Select All)
if(GetPlayerHealth() == 100.0f//code here 

PHP Code: (Select All)
if(GetPlayerHealth() == 100.0f)
{
    
//code here


Keep in mind, it's 4am here and I haven't done HPL2 in a couple of months~

Yeah, now my game loaded just fine, although it still doesn't work. How I'm executing the code is by placing a big script area which basically covers the whole map, changing it so that it would check the health costantly, and if the health level is equal to 100, the quest i want and image trail effects are gone. However, that doesn't work.

Here's how the script fragment basically looks like:

PHP Code: (Select All)
void onStart()
{
AddEntityCollideCallback("Player""check_health""healing"false0); 
}

void healing(string &in asParentstring &in asChildint alState
{
    if(
GetPlayerHealth() == 100.0fFadeImageTrailTo(0,0.2f); CompleteQuest("quest_heal""heal");

(This post was last modified: 05-12-2016, 07:19 PM by Slanderous.)
05-12-2016, 07:10 PM
Find


Messages In This Thread
RE: "If get player health" function? - by Slanderous - 05-12-2016, 07:10 PM



Users browsing this thread: 1 Guest(s)