HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Random Creep Spawning

07-04-2003, 11:16 PM#1
slain.death
I'm trying to figure out how to make a random set creeps spawn at 6:00 am game time (6.00) at specific points on the map. This is similar to the DotA Creep spawn triggers. Can anyone help me?
07-05-2003, 10:23 AM#2
Dead-Inside
Sure, why not.

I don't know what you want, but I'll make both I think you might have.

First at map start, assaign any regions you want to a Region Array (Set RegionArray[1] = SpawnCreepNorth, Set RegionArray[2] = SpawnCreepSouth ect), until you got all of your Creep Spawn regions in numbers in the array.

Now, when dawn falls:
E: Time of day becomes equal to XXX
A: Set RandomInteger = Random number between 1 and (how many numbers you used in your RegionArray!)
Spawn xxx for player x in RegionArray[RandomInteger]

If you want to spawn more or different creep, just redo it in the same trigger, like:
Spawn yyy for player x in RegionArray[RandomInteger]
Set RandomInteger = Random number between 1 and (how many numbers you used in your RegionArray!)
Spawn xxx for player x in RegionArray[RandomInteger]

Ect ect... Now, if you just want to spawn them at random locations in ONE region, there is an option "Random point in region X". You can use this with your Array set up as above as well to have them NOT spawn in the middle of the region, but more somewhere in it...

Regards
Dead-Inside