Schedule issue
by Howard Dortch · in Torque 3D Professional · 10/05/2012 (12:08 pm) · 4 replies
I have a schedule running using
%this.schedule(2000,run,%obj);
I tried to cancel the schedule using the object name as in cancel(pump.schedule) but it keeps running. Can someone tell me how to cancel this type of schedule?
%this.schedule(2000,run,%obj);
I tried to cancel the schedule using the object name as in cancel(pump.schedule) but it keeps running. Can someone tell me how to cancel this type of schedule?
#2
The setup is like so:
function WaterPump::Run(%this,%obj)
{
bla...
%this.schedule(2000,Run,%obj);
}
I need to selectively kill one of the pumps via cancel
10/05/2012 (1:08 pm)
Well the issue there is I use a single run function for all the pumps so I can't use a global like that otherwise it would cancel the run on all 4 objects.The setup is like so:
function WaterPump::Run(%this,%obj)
{
bla...
%this.schedule(2000,Run,%obj);
}
I need to selectively kill one of the pumps via cancel
#3
10/05/2012 (2:04 pm)
function WaterPump::Run(%this, %obj)
{
bla...
%obj.runSchedule = %this.schedule(2000, Run,%obj);
}
later...
cancel(%obj.runSchedule);
Associate Steve Acaster
[YorkshireRifles.com]
I've not tried cancelAll() - it might be 1.2 only - but do use cancel() in 1.1;