issues with delay in schedule() command
by Jeff Yaskus · in Torque Game Engine · 01/24/2010 (1:53 am) · 2 replies
I'm trying to place an object with its "building in progress" animation ... and 80 seconds later, change to its "idle" animation which shows building completed.
However, it automatically goes to "idle" ... unless I comment out the schedule command.
Is there something wrong with my syntax ?
Note; This is using TGE 152 and RTS kit ...
However, it automatically goes to "idle" ... unless I comment out the schedule command.
Is there something wrong with my syntax ?
// %b.playRootAnimation();
%b.setActionThread("Create"); // start building out as under construction
Schedule(80000, 0,%b.setActionThread("idle") , 1);Note; This is using TGE 152 and RTS kit ...
About the author
Long time gamer, hacker and programmer. With dreams of making video games -
#2
As you have found yourself, this part in your first version immediately invokes the going to idle state rather than deferring the call through schedule:
'schedule' needs to be passed an object (optional) to call a function on, a function to call (i.e. it's name), and the parameters to be passed to the function.
Your second version does just that.
01/24/2010 (9:43 am)
As you have found yourself, this part in your first version immediately invokes the going to idle state rather than deferring the call through schedule:
%b.setActionThread( "idle" );
'schedule' needs to be passed an object (optional) to call a function on, a function to call (i.e. it's name), and the parameters to be passed to the function.
Your second version does just that.
Torque Owner Jeff Yaskus
jy games
and actually seemed to take ~30 seconds