HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Any Number 1-5, how do i do it?

04-15-2004, 12:28 AM#1
Kelna2
ok, i know my triggers pretty well, but i really don't know how to do this, i pretty much know that it has to do with the number min and max, but i dont know how to put it together. Anyone wanna help me out?
04-15-2004, 12:36 AM#2
joseka
Quote:
Originally Posted by Kelna2
ok, i know my triggers pretty well, but i really don't know how to do this, i pretty much know that it has to do with the number min and max, but i dont know how to put it together. Anyone wanna help me out?

You mean to make Random number???

Just create an Integer Variable and..

Action
Set nVariable = Math Rand Numebr between 1 and 5

It not necesary to create the variable you could = all type of integer data to that :D
04-17-2004, 02:10 PM#3
Kelna2
Quote:
Originally Posted by joseka
You mean to make Random number???

Just create an Integer Variable and..

Action
Set nVariable = Math Rand Numebr between 1 and 5

It not necesary to create the variable you could = all type of integer data to that :D

no, i already know what random number does, what i need is a condtion that says like if number of units in location are between 5-15, then do what ever
04-19-2004, 06:45 PM#4
Kelna2
Actually its more like this, i have a variable that is an array and i want it to be any array within the variable, so like if unit was a variable it would be like

Unit[1-5]

or something like that, no i do not want random number, i know what that does, I am looking for ANY number between 1-5.
04-19-2004, 06:52 PM#5
Kamux
I still don't get what you are trying to say, but you could use a for loop.
04-20-2004, 01:58 AM#6
Kelna2
OK, say i have a variable, the variables name will be Unit and say the variable is an array, and the variable's array is 5, so i want a trigger that says,

If: Boolean: if Unit[1-5] is equal to alive

this would not be a random number, but ANY number that fits the trigger, so if unit[2] is alive then the trigger would continue, even if unit[1] is dead. do you understand?
04-20-2004, 04:00 AM#7
zotax
I think what you need is a loop:

Code:
For each (ineteger A) from 1 to 5 Do (actions)
      Loop Actions
If Unit[Integer A) is alive = true
Then
.............
04-22-2004, 06:47 PM#8
Kelna2
Oh, I get it. Thank you!
04-22-2004, 07:18 PM#9
ThyFlame
If (number of units in region > 5) AND (number of units in region < 15)
04-22-2004, 07:55 PM#10
AnarkiNet
if a unit is going to be all the array indexes, just use a regular non-array variable. zap, problem solved.
04-22-2004, 11:31 PM#11
ThyFlame
It astounds me how far away from the question you all have gotten...