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
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#7
RE: Activating a script area

(06-21-2012, 05:09 PM)andyrockin123 Wrote: 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);
}
}
Thank you, however the sound actually did play before.

And FasthunteR, it didn't work unfortunately


Let me try out your new one... you guys are posting solutions too fast! Tongue
(This post was last modified: 06-21-2012, 05:18 PM by ApeCake.)
06-21-2012, 05:17 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)