Author Topic: Locked.  (Read 907 times)

This topic has been locked.
« Last Edit: June 12, 2010, 01:40:48 PM by A Person. »

That is not the official torque script documentation. There isn't one. There are 2 good guides that are sticky'd, and also some others. Do not say it the official one unless you know what you are talking about.

getRandom:

when wanting to assign a variable to getrandom, use this:

%var = getRandom(x,y);

x is the minimum number, y is the maximum.

uses for getrandom:

Code: [Select]
%var = getRandom(0,5);
if(%var $="1")
{
    do stuff when variable is 1
}
else if(%var $="2")
{
    do stuff when variable is 2
}
else if(%var $="3")
{
    do stuff when variable is 3
}
else if(%var $="4")
{
    do stuff when variable is 4
}
else if(%var $="5")
{
    do stuff when variable is 5
}

Obviously this would have to be inside a function and all that stuff, i'm just not going to do that cause i'm lazy.

-snip-

Thank you so much, Placid!

Just wondering, how would I make it so that it wouldn't do the same thing in a row?

That is not the official torque script documentation. There isn't one. There are 2 good guides that are sticky'd, and also some others. Do not say it the official one unless you know what you are talking about.

Derp:
« Last Edit: June 12, 2010, 12:43:33 PM by A Person. »