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
Player reacting when looking at a area
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#4
RE: Player reacting when looking at a area

Let's say your area is named "AreaScare". Let's call the Function "LookScare".

So, in your OnStart() function, you need what Tanshaydar posted above:

SetEntityPlayerLookAtCallback("AreaScare", "LookScare", true);

Then you would have your function later on in the code:

void LookScare(string &in asEntity, int alState)
{
//Whatever you want to happen goes here
}

You can use if statements to check the state by using:

if(alState==1)
{
//Whatever you want to happen goes here
}

-1 is also a valid number for alState.

04-05-2011, 04:49 PM
Find


Messages In This Thread
RE: Player reacting when looking at a area - by Anxt - 04-05-2011, 04:49 PM



Users browsing this thread: 1 Guest(s)