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
GetEntityExists not work for Player
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: GetEntityExists not work for Player

I've tried it before but it didn't work for me. You could do this however:

void OnStart() { AddEntityCollideCallback("Player", "DeepWaterAbove", "StateFunction", false, 0); }

bool bInArea = false;

void StateFunction(string &in parent, string &in child, int state)
{
    bInArea = state == 1 ? true : false;
}

Now you have a global boolean variable which you can call anywhere else in your script Smile

EDIT: To clarify above, the variable is global in the sense that you can use it in other functions within the same hps file. You can't use it in a different map though. In that sense it is still local Smile

(This post was last modified: 08-16-2011, 05:02 AM by palistov.)
08-16-2011, 04:59 AM
Find


Messages In This Thread
GetEntityExists not work for Player - by Rapture - 08-16-2011, 04:27 AM
RE: GetEntityExists not work for Player - by palistov - 08-16-2011, 04:59 AM
RE: GetEntityExists not work for Player - by Kyle - 08-16-2011, 01:23 PM



Users browsing this thread: 1 Guest(s)