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
Spawning entity where player is looking
Theforgot3n1 Offline
Member

Posts: 192
Threads: 20
Joined: Apr 2012
Reputation: 6
#6
RE: Spawning entity where player is looking

(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);
}

Confusion: a Custom Story - Ch1 for play!
http://www.frictionalgames.com/forum/thread-15477.html
About 50% built.
Delayed for now though!
(This post was last modified: 06-03-2012, 05:35 PM by Theforgot3n1.)
06-03-2012, 05:35 PM
Website Find


Messages In This Thread
RE: Spawning entity where player is looking - by Theforgot3n1 - 06-03-2012, 05:35 PM



Users browsing this thread: 1 Guest(s)