(06-03-2012, 02:24 AM)Topsu Wrote: Oh ok, But what about I set few areas and when you look at one it spawns entity there and the other areas set innactive or are removed? Any tips for doing that?
Ofcourse at the direction player is looking at and like 1 meter away spawning entity would be best. :/
Try to have the "Area1" about 1 meter in front of the Player, when he looks at it, by predicting movements and doing distractions, etc.
void OnEnter()
{
SetEntityPlayerLookAtCallback("Area1", "SpawnEntity", true);
}
void SpawnEntity(string &in asEntity, int alState)
{
SetEntityActive("servant_grunt1",true);
SetEntityActive("area2",false);
SetEntityActive("area3",false);
}