Also:to other people learning scripting i found this great program that comes with unity and makes writing/reading code much easier. i can't upload it to media fire but you can go to the unity website and download unity. the program is called unitron and i color codes things and does indents for you which is nice.
thanks for the tutorialsi was also just curios is there anyway to delay a code from executing like tell it to wait 1 second then echo?
schedule(1000, 0, "echo", "Hello, late world.");
schedule(time ms, 0, "command name", "argument 1", "argument 2");
%obj.schedule(1000, "delete");
%objectID.schedule(time ms, "command", "argument 1", "argument 2");
yeppers.Code: [Select]schedule(1000, 0, "echo", "Hello, late world.");Code: [Select]schedule(time ms, 0, "command name", "argument 1", "argument 2");(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.)If you're scheduling an object's function,Code: [Select]%obj.schedule(1000, "delete");Code: [Select]%objectID.schedule(time ms, "command", "argument 1", "argument 2");
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.
Code: [Select]schedule(1000, 0, "echo", "Hello, late world.");Code: [Select]schedule(time ms, 0, "command name", "argument 1", "argument 2");(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.)