HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Move to One of 2 regions randomly

06-15-2004, 03:25 AM#1
vin_gafsel
I have a path up the middle and a region each side... What i wanna know how to do is set up a trigger so when an enemy unit enters a specific place it moves it instantly to one of the 2 regions.. not the same one everytime. And i cant make it one big region cause that would go over the path and have units respawn on the path. Any way to do this? thanks
06-15-2004, 04:53 AM#2
CynicalYouth
set randomnumber=random number between 1 and 100
if randomnumber<50 then
move unit to region 1
else
move unit to region 2

i use a number between 1 and 100 because it sets up a percent. if you use 50 you get 50% if you use 25 you get 25% going to region 1. I hope that answers your question.
06-15-2004, 05:34 AM#3
vin_gafsel
Thanks thats exactly what i wanted.