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
Activating a script area
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#5
RE: Activating a script area

Yes, script areas can in fact be set active/inactive. Quick question though, when "OnPickupKey" is called, does the PlaySoundAtEntity work? If the sound doesn't play, then what I'm about to show you will most likely work; if it does play and the script area doesn't activate, it is a spelling error you made (it's hard to tell because I can't see your level editor Tongue)

Anyways, try replacing the "OnPickupKey" function with this:

void OnPickupKey(string &in asEntity, string &in asType)
{
if(asType == "OnPickup") //I'm pretty sure this is what needs to be specified for this function
{
SetEntityActive("pusharea", true);
PlaySoundAtEntity("", "scare_male_terrified5.snt", "randomatticdoor", 2, false);
}
}

I rate it 3 memes.
06-21-2012, 05:09 PM
Find


Messages In This Thread
Activating a script area - by ApeCake - 06-21-2012, 04:58 PM
RE: Activating a script area - by MaZiCUT - 06-21-2012, 05:04 PM
RE: Activating a script area - by ApeCake - 06-21-2012, 05:05 PM
RE: Activating a script area - by Cruzore - 06-21-2012, 05:04 PM
RE: Activating a script area - by Adny - 06-21-2012, 05:09 PM
RE: Activating a script area - by ApeCake - 06-21-2012, 05:17 PM
RE: Activating a script area - by Cruzore - 06-21-2012, 05:17 PM
RE: Activating a script area - by Cruzore - 06-21-2012, 05:20 PM
RE: Activating a script area - by Adny - 06-21-2012, 05:23 PM
RE: Activating a script area - by ApeCake - 06-21-2012, 05:33 PM
RE: Activating a script area - by Cruzore - 06-21-2012, 06:05 PM
RE: Activating a script area - by ApeCake - 06-21-2012, 06:19 PM
RE: Activating a script area - by Cruzore - 06-21-2012, 06:21 PM



Users browsing this thread: 1 Guest(s)