Frictional Games Forum (read-only)
Area Script 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Area Script Question (/thread-15006.html)



Area Script Question - TheGilgameshZocker - 04-22-2012

How can I set an Area from inactive to active? Things like SetAreaActive("example_area") didn't work. It would be very nice if you could post me a script part like on the tutorials threads on Frictional Games Wiki.

Thanks for replies Big Grin


RE: Area Script Question - Homicide13 - 04-22-2012

You cannot (at least as far as I know).

If you want to remove for example a collide callback with the area, you should use the
RemoveEntityCollideCallback
function (you can find details about it it here: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions ).



RE: Area Script Question - Cranky Old Man - 04-22-2012


You can add callbacks in other functions than just OnStart():

Code:
AddEntityCollideCallback("Player", "Area_37", "Function_86", true, 1);




RE: Area Script Question - Putmalk - 04-22-2012

SetEntityActive works with areas just fine.



RE: Area Script Question - Strembitsky - 04-23-2012

Yeah, you can simply do SetEntityActive("Area_Name", false); to disable an area.