Frictional Games Forum (read-only)

Full Version: How to activate entities by looking at an area
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hey guys,

i need your help once again. i already checked the wiki but cant find the code for it...

and if you could give me the code for signs, you collide with... thanks
There is an Playerlookatcallback thingy in the options of an area try working with that Wink
(11-12-2012, 06:37 PM)Steve Wrote: [ -> ]There is an Playerlookatcallback thingy in the options of an area try working with that Wink
yes i know but i dont know how to work with that Big Grin im a noob here Tongue
It works like this:
When the cursor is inside the area, the function is calling.

Ex. if the function is "LookAtAreaFunc"

then it is:

void LookAtAreaFunc(string &in asEntity, int alState)
{
if(alState == 1) //Only if the player is look at the area
{
//Do stuff
}
}
(11-12-2012, 06:48 PM)tonitoni1998 Wrote: [ -> ]
(11-12-2012, 06:37 PM)Steve Wrote: [ -> ]There is an Playerlookatcallback thingy in the options of an area try working with that Wink
yes i know but i dont know how to work with that Big Grin im a noob here Tongue
SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);


Name: Name of the entity
Callback: Function