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
Create/Activate an area when interacts with entity
cheztheguy Offline
Junior Member

Posts: 12
Threads: 7
Joined: Jun 2011
Reputation: 0
#1
Create/Activate an area when interacts with entity

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!
(This post was last modified: 10-27-2011, 01:27 PM by cheztheguy.)
10-25-2011, 11:37 AM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#2
RE: Create/Activate an area when interacts with entity

SetEntityActive("Realize_1", true);
10-25-2011, 12:39 PM
Website Find
Patacorow Offline
Member

Posts: 135
Threads: 11
Joined: Jul 2011
Reputation: 3
#3
RE: Create/Activate an area when interacts with entity

Areas can be treated like entities, including when activating and deactivating them. c:
10-26-2011, 09:36 PM
Find




Users browsing this thread: 1 Guest(s)