Why does my schedule script execute instantly?
by Snaggz · in Torque Game Engine · 05/02/2006 (7:13 pm) · 5 replies
#2
ie
Schedule(4000,6, attackz);
the reason attackz is executing instantly is that it's being called right in the Schedule line,
and the *result* of it being called (which is probably nothing) is then being scheduled.
you're doing something similar to
Schedule(4000, 6, 2+2);
- it's going to try to schedule "4", not "2+2".
05/02/2006 (7:32 pm)
Make your "attackz()" look like the "echo".ie
Schedule(4000,6, attackz);
the reason attackz is executing instantly is that it's being called right in the Schedule line,
and the *result* of it being called (which is probably nothing) is then being scheduled.
you're doing something similar to
Schedule(4000, 6, 2+2);
- it's going to try to schedule "4", not "2+2".
#3
05/02/2006 (7:37 pm)
Works like a charm. thanks :D
#4
that has to be the best
"How to answer a question"
example I have seen yet
hats off!! to a well written response
05/06/2006 (10:39 pm)
To: Orion Elenzil (Commercial)that has to be the best
"How to answer a question"
example I have seen yet
hats off!! to a well written response
#5
05/06/2006 (10:47 pm)
Thanks!
Torque 3D Owner Snaggz
i have this in my armor::ondamage function. it executes the function attackz() instantly... i put
schedule(4000,6,echo,"Hello world");
in and it waited the 4 seconds.