Frictional Games Forum (read-only)

Full Version: Player Collide Area question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering which functions you need to use to tell the game to do a certain event while the player is inside an area and a different one if he leaves or none at all. Also how to make the event re-occur if the player enters this area again. I'm guessing that for the collide callback you need "bool abDeleteOnCollide" as false and "int alState" as 0(?)

I tried using the "GetEntitiesCollide" in an if else ladder to check if the player is in the room or not, but it wouldn't seem to work. I tried something like this:

Code:
void MyFunc(string &in asParent etc etc..)

{
        if(GetEntitiesCollide("Player", "AreaCollide_1") == false){
        Stuff I want to happen
        }
}
Check script tutorial 1 and specifically the last video tutorial from mulledks http://hpl2.frictionalgames.com/tutorials which is very detailed in showing how to do it.
I'd make two areas in the same place, one that activates when entered and the other one when left.