HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spawn multiple units in random point in rect.

08-15-2004, 07:52 AM#1
HexenLordX
Bumped into a problem.. again.

I made a rect, and a rather large one at that. I set the trigger to spawn 250 units in random points in spawn01 facing random angle. The thing I didn't know, is that it would spawn all 250 at the same point in the rect, facing the same angle. What do I do?

I wanted them scattered about in the rect, facing random angles, instead they are bunched somewhere in the rect facing the same random angle. Does anyone know how to fix this, or a way around it? I don't want to have to place 250 spawn actions for 250 different units to be spawned in the rect.
08-15-2004, 09:45 AM#2
SpadeZ
You'll need to make a loop that fires 250 times

e.g
Code:
    [b]Events[/b]
    [b]Conditions[/b]
    [b]Actions[/b]
        For each (Integer A) from 1 to 250, do (Actions)
            Loop - Actions
                Unit - Create 1 Footman for Player 1 (Red) at (Random point in (Playable map area)) facing (Random angle) degrees
08-15-2004, 09:59 AM#3
HexenLordX
Thanks.. didn't think of using integers.