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
asAtTargetCallback???
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#6
RE: asAtTargetCallback???

(01-16-2013, 06:00 AM)reper1210 Wrote: thanks for the help, it didn't crash my game this time but i guess i do need a timer. how would that go into my script? and where?

Taken from the wiki:

PHP Code: (Select All)
void AddTimer(stringasNamefloat afTimestringasFunction); 
Creates a timer which calls a function when it expires.
Callback syntax: void MyFunc(string &in asTimer)

asName - the name of the timer
afTime - time in seconds
asFunction - the function to call

So you would put this after the StartPlayerLookAt line:
PHP Code: (Select All)
AddTimer(""3"StopLookingFunc"); // you can change '3' to whatever number you like 
Then make a new function called "StopLookingFunc" that looks like this:
PHP Code: (Select All)
void StopLookingFunc(string &in asTimer)
{
    
StopPlayerLookAt();


In Ruins [WIP]
01-16-2013, 06:16 AM
Find


Messages In This Thread
asAtTargetCallback??? - by reper1210 - 01-16-2013, 03:51 AM
RE: asAtTargetCallback??? - by str4wberrypanic - 01-16-2013, 04:00 AM
RE: asAtTargetCallback??? - by reper1210 - 01-16-2013, 04:59 AM
RE: asAtTargetCallback??? - by NaxEla - 01-16-2013, 05:39 AM
RE: asAtTargetCallback??? - by reper1210 - 01-16-2013, 06:00 AM
RE: asAtTargetCallback??? - by NaxEla - 01-16-2013, 06:16 AM



Users browsing this thread: 1 Guest(s)