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
#10
RE: Activating a script area

(06-21-2012, 05:23 PM)andyrockin123 Wrote: An alternative that I see is vastly underused is using the level editor to reduce such scripting complications; if you select any (interactable) entity, in the 2nd tab there is a box labeled "PlayerInteractCallback", just type in the name of your function, and use the syntax:
"string &in asEntity"

So the OP can select his key in the editor, type in OnPickupKey for the function then write:

void OnPickupKey(string &in asEntity)
{

SetEntityActive("pusharea", true);
PlaySoundAtEntity("", "scare_male_terrified5.snt", "randomatticdoor", 2, false);
}


Just something I thought I'd share since I don't see it used too often, and it's pretty useful for reducing script clutter.
Doesn't seem to be working ;_; I have no idea what to do now. I must've made a stupid mistake somewhere or something, however there are no errors...
06-21-2012, 05:33 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)