Frictional Games Forum (read-only)

Full Version: Create/Activate an area when interacts with entity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys;
So I have these two rooms. One room is where you start out with (it's a bedroom). And the other is a dining/living-room type. So, You start off in the bedroom, and you go into the dining room. You find a lantern, and when you pick it up, I want to make an area activate in the bedroom so that when you go back, the area will do everything that the EntityCollideCallback's were listed.
Is there anyway to "spawn" or set active a script area?

EDIT: I found an "Active" checkbox when you select the script area. In the script (.hps) file, how do you activate/deactivate the script? What is the script function?
The script area is called "Realize_1" (no quotes)
and the PlayerInteractCallback function is "PickedUpLantern"
After "PickedUpLantern" is called, I want "Realize_1" to activate (or appear) and I want several things to happen, like lower sanity, and make the player look at the entity, but I have the AddEntityCollideCallback things set up.

Thanks for your help!
SetEntityActive("Realize_1", true);
Areas can be treated like entities, including when activating and deactivating them. c: