340 posts joined 2004-07-09
#1 2004-09-08
Triggers- Random %'s using integers... someone said you can use integers for a % chance to do something... i see the part that says for each integer "1-10" do actions, but how do i have it choose the integer between ... say 1-30?
1,399 posts California... I moved! joined 2004-08-20
#2 2004-09-08
i dont know, but that would be cool, because then i could make a monopoly map!
340 posts joined 2004-07-09
#3 2004-09-09
lol that would be cool... like dice !
i did have another way to make random chances like that, make however regions to equal the %chance u need (25% would be 4) make them same size and space them apart fairly large, order a unit to patrol from the middle of one to the middle of the one on the other edge, use conditions like unit in region equal to true. spacing is critical along the units speed. also make the unit unselectable.
503 posts Madison, WI joined 2004-04-03
#4 2004-09-09
On the For action, you can click on the 1 and the 10 and change them to any integers that you want.
340 posts joined 2004-07-09
#5 2004-09-09
so does it automatically pick a number when u use those than? cause thats what i needed
444 posts joined 2004-07-30
#6 2004-09-09
um, for X to Y is a loop, which means it uses each and every number
you're looking for the function
random integer between X and Y
or
random real between X.x and Y.y
to make a bi-random statement u use an if statement
if (random integer between 1 and 3) < 2 then
"you got low 66%"
else
"you got high 33%"
as for multiple choices you need to store the random number in a variable first and then do the same checks to the variable
o, and theres also the option of using the function
random percent
which gives u a number between 0.00 and 1.00
340 posts joined 2004-07-09
#7 2004-09-09
hehe can you say that again in english plz? im not to good at % chances variables etc so i got NO idea what your talking about
340 posts joined 2004-07-09
#8 2004-09-09
im not good at much... ive only been making maps for 2 months and i rarely worked on them in that time.
444 posts joined 2004-07-30
#9 2004-09-10
RaD- hehe can you say that again in english plz? im not to good at % chances variables etc so i got NO idea what your talking about ok, look for the function called Math - Random Integer or something like that, it looks like
(Random integer number between 1 and 10)
once u use it
what this function does is return a random integer between 1 and 10
so,
set varX = random integer number between 1 and 3
if varX == 1 then "YOU GOT ONE"
if varX == 2 then "YOU GOT TWO"
if varX == 3 then "YOU GOT THREE"
alternatively, theres
(Random percentage)
which gives u a number between 0.00 and 100.00