Blockland Forums > Modification Help

Could i get some help with scripting

Pages: << < (3/3)

Hazmat:


--- Quote from: Headcrab Zombie on March 01, 2011, 01:47:08 AM ---Those are functions.
As for random numbers, getRandom(min, max) returns a random number between min and max, or getRandom(max) returns a random number between 1 and max.

Also, you should check out the stickies in coding help.

--- End quote ---
thanks

Red_Guy:


--- Quote from: Iban on February 27, 2011, 08:36:34 AM ---
--- Code: ---schedule(1000, 0, "echo", "Hello, late world.");
--- End code ---

--- Code: ---schedule(time ms, 0, "command name", "argument 1", "argument 2");
--- End code ---
(I'm not quite sure what the 0 is for. It doesn't appear in official Torque documentation but it is needed in Blockland's version of Torque.)

--- End quote ---
the 2nd argument is a "guard" that means "if the object is gone when the schedule happens, then dont bother"

So something like this:  schedule(<somevalue>, MissiongGroup, "function", "args");
Will do the schedule on time -- but if the MissionGroup (your map) goes away then dont bother (map change anybody?).  This is helpful when you arent able to do a cancel() on everything thats scheduled and you want to make sure your script cleans things up nicely.



Pages: << < (3/3)

Go to full version