HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

how do I get #up to?

05-11-2009, 09:15 AM#1
311
I have spawning units in my map they spawn basicly like a tower D. or enfo type of map, having rounds and spawning units each round. However I want to add random amount of units from previous rounds to each round, im not sure how to do that though, well an easy way without needing trigger for each unit, because im pretty sure there's a way to get it in 1 trigger. to make it less confusing
I have my units in varibles already so like
round (1) = footy
round (2)= rifleman
round (3)=spell breaker
and so on

heres what I want, lets say its round 3 I want some of round 2 and round 1 units to spawn, what's the trigger to make create random amount of units from each previous round which would be (round 1-2in this case) I have lots of rounds in my map so when its round 12 or something I want to create units from 1-11 rounds. However since my map is spread into acts later I would need a trigger to create units only from round 13-21 when its round 21.



to sum it up whats the trigger for
create (5) units from each previous round and add them to this round
Im not sure how to explain it any better, still might be kind of confusing
05-11-2009, 10:27 AM#2
Anitarf
Sounds like you need to use an integer A loop, looping from 1 to the current round and creating the units from each round inbetween.
05-11-2009, 12:46 PM#3
311
Quote:
Originally Posted by Anitarf
Sounds like you need to use an integer A loop, looping from 1 to the current round and creating the units from each round inbetween.

What do I put for the unit though, because I thought about that also.
E. round 5 starts
A. create 10 unit(round we are on)
A. create 15 unit(integer A)
A. for each integer A create (dunno what I put here)
05-11-2009, 06:02 PM#4
MaD[Lion]
if u wanna random pick 5 of previous randoms:
RoundUnit[1] = footman
RoundUnit[2] = rifleman
RoundUnit[3] = gays
...

for each integer A from 1 to 5 do:
UnitType = random integer 1 to ThisRound-1
create 1 unit of RoundUnit[UnitType] at bla bla....


if u wanna create 5 from each round before:
For each integer A from 1 to (ThisRound-1) do:
create 5 unit of type RoundUnit[integer A] at bla bla...