08-21-2011, 10:21 PM
08-21-2011, 10:27 PM
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 asEntity, 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
Calls a function when the player looks at a certain entity.
Callback syntax: void MyFunc(string &in asEntity, 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
08-21-2011, 10:38 PM
There is also an option on all of the entities:
"PlayerLookAtCallback"
Put whatever you want in there.
Syntax for the lookat function:
void FuncName(string &in asEntity, int alState)
{
}
- I edit because there was misunderstanding, the (funcname) was just a placement
"PlayerLookAtCallback"
Put whatever you want in there.
Syntax for the lookat function:
void FuncName(string &in asEntity, int alState)
{
}
- I edit because there was misunderstanding, the (funcname) was just a placement
08-22-2011, 04:51 AM
(08-21-2011, 10:38 PM)Juby Wrote: [ -> ]There is also an option on all of the entities:
"PlayerLookAtCallback"
Put whatever you want in there.
Syntax for the lookat function:
void LookAt(funcname)(string &in asEntity, int alState)
{
}
I dont think the Function name goes in "()" so use this I guess:
void LookAt YourFuncName(string &in asEntity, int alState)
08-22-2011, 04:54 AM
As Obliviator Stated it would be
SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);
not PlayerLookAtCallback (That Forces a Player to look somewhere)
-Grey Fox
SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);
not PlayerLookAtCallback (That Forces a Player to look somewhere)
-Grey Fox