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
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#3
RE: Enemy spawning at an area

Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player" , "lurkerspawn" , "spawn_water_lurker" , true , 1);
}

void spawn_water_lurker(string &in asEntity)
{
SetEntityActive("rawr", true);
StartPlayerLookAt("rawr", 10, 50, "");
AddTimer("", 0.5f, "TimerSlamDoor");
}

void TimerSlamDoor(string &in asTimer)
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
AddTimer("", 1.0f, "TimerStopLook");
}

void TimerStopLook(string &in asTimer)
{
StopPlayerLookAt();
}


Now. When you enter the "lurkerspawn" area the function "spawn_water_lurker" will get activated and a breathing sound will be played and the lurker named "rawr" will spawn and then your screen will automaticly move and look at "rawr" for 1sec then return to normal.

[Image: 44917299.jpg]Dubstep <3
(This post was last modified: 05-26-2011, 05:58 PM by xtron.)
05-26-2011, 05:58 PM
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: 3 Guest(s)