Im sure there have been threads similar to this one before, but I've searched with no avail. so heres my problem, its simple and do able i just dont know how:
How do I make an enemy (water lurker) spawn/activate when I enter an area? I also want the player to look at the enemy but not lock the screen on the lurker cuz you'll need to turn and run.
i made the area and lurker heres the names
Area:lurkerspawn
lurker:rawr
any help is 200% appreciated thanks, as you can probably tell im relatively new to this stuff
<3
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.
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.
Dubstep <3
(This post was last modified: 05-26-2011, 05:58 PM by xtron.)