Random Roshan-like spawns ?

Trigger Noob =]

Member!
Joined
Dec 4, 2006
Messages
36
Reaction score
0
Location
Behind you O_O
I'm currently making an AoS map i have about 12 Roshan-like units that i want to be randomly made at a certain location.

And i want another and a different one spawned after the first dies and another after that one dies and so on and so forth until they all have died. and when they all have died, an even more crazy unit is created at the centre of the map.

I believe i can do that last part when all of them are dead but im not really sure how i would do the random spawning thing.

I've already set the units into a unit-type array and created the trigger for creating the special unit.

But after that i'm basically completely lost.

Can anyone post a sample trigger or point me in the right direction ?

Thanks

Trigger Noob =]
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
If you have a Unit array, just have an iterator integer start at 0.

If the Unit at index 0 gets killed, capture that event by adding 1 to the iterator. Then peform a wait for a certian period of time, then spawn the unit at index iterator. Keep going until the iterator is at the maximum size of the Array - 1 (since 0 is an index). At this point spawn the super unit in the middle.

If you want to randomize the order, you would need to random a number between 0 -11. Then randomize the number again if the Roshan at Unit[randomed number] is dead or not.

I am sorry I can't post triggers for it, but I am thinking at the top of my head. Also, I don't really operate by giving out triggers sometimes, its more beneficial to figure it out the coding yourself.
 

NewPosts

New threads

Top