Game Development Community

Using schedule()

by AIDan · in Torque Game Engine · 11/23/2001 (10:40 am) · 5 replies

This functions makes me some trouble.

schedule(%timetowait, 0, "dothis");

What is the second value for??

greetings
Daniel

#1
11/23/2001 (11:02 am)
There are two schedule command, one attached to an object, the other not. The object one:

%object.schedule(%time, %command, args....)

or it's equivilent:

schedule( %object, %time, %command, args...)

The second form is essentually the same thing, but allows you to pass 0 for the object argument (the previous form is a method call so you cannot pass it a null object):

schedule(%time, %object, $command, args....)

Here, %object can be 0.
#2
11/23/2001 (11:18 am)
THX, so the error has to be in my function :(
#3
11/23/2001 (11:44 am)
Hi, it still does not work.
I want to call this function every second. This is my current idea.

function increaseMissionTimer()
{
	$MissionTimer++;
	processIncreaseMissionTimer(4);
	schedule(1000, NOOBJECT, "increaseMissionTimer");
}

greetings
Daniel
#4
11/23/2001 (2:06 pm)
Try using this.

function increaseMissionTimer()
{
$MissionTimer++;
processIncreaseMissionTimer(4);
schedule(1000,0, "increaseMissionTimer");
}
#5
11/24/2001 (1:11 am)
THX, now it works.