Frictional Games Forum (read-only)
Player Collide Area question - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Player Collide Area question (/thread-4823.html)



Player Collide Area question - Equil - 09-29-2010

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
        }
}



RE: Player Collide Area question - jens - 09-29-2010

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.


RE: Player Collide Area question - Frontcannon - 09-29-2010

I'd make two areas in the same place, one that activates when entered and the other one when left.