HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

What happened to RANDOM

07-17-2002, 03:57 PM#1
Guest
In starcraft there was an option for switches (called variables in war3) to be random (so either On or off (true or false)).
But that option isn't there anymore in the world editor.. how can I assign a random value to a boolean?

If it's not possible, how can I make reinforcements of a random type (for example either footman or knight) enter the map?
07-17-2002, 04:32 PM#2
kdub
do this

make integer x

set it equal to a random integer between 1 and 2.

do an if then else action and if x is 1 make the boolean true, else make the boolean false.

that will work.




you could also set x to a random integer between 1 and 10 and check if x>9 then make the boolean true else make it false. this would make the boolean true 90% of the time.
07-17-2002, 04:41 PM#3
Guest
That solves it entirely. Even better than the starcraft method :)