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
Enemy spawning at an area
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Enemy spawning at an area

To activate the entity, add a collide callback involving the player and a designated trigger area. Add this function to your OnStart:
AddEntityCollideCallback("Player", "area_trigger_entity", "TriggerFunction", true, 1);

//-------------------------
To make the player look at it, place this function under TriggerFunction:
StartPlayerLookAt("water_lurker", 3.0, 3.0, "LurkerSeen");

//------------------------

Lastly, add a third function, LurkerSeen, and place this function under it:
StopPlayerLookAt();

//------------------------

If you have trouble piecing together your script post another reply, I'll lay out an entire script for you.

(This post was last modified: 05-26-2011, 08:29 AM by palistov.)
05-26-2011, 08:29 AM
Find


Messages In This Thread
Enemy spawning at an area - by SLAMnesia - 05-26-2011, 06:25 AM
RE: Enemy spawning at an area - by palistov - 05-26-2011, 08:29 AM
RE: Enemy spawning at an area - by xtron - 05-26-2011, 05:58 PM



Users browsing this thread: 1 Guest(s)