(04-05-2011, 04:26 PM)Tanshaydar Wrote: There should be a PlayerLookAtCallback for entities. For areas...
void SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);
Calls a function when the player looks at a certain entity.
Callback syntax: void MyFunc(string &in entity, int alState)
alState: 1 = looking, -1 = not looking
asName - internal name
asCallback - function to call
abRemoveWhenLookedAt - determines whether the callback should be removed when the player looked at the entity
I dont understand? Could you give me an example or is it something like:
void SetEntityPlayerLookAtCallback("AREA", "FUNCTION", true);