HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

3 spawning questions

12-12-2003, 02:33 PM#1
Corporate_Oxide
I am making castle defence map where creeps spawn from each corner of the map and slowly make their way to the center. I'm new to triggers so currently I am using an elapsed time event to determine when the creeps spawn. I know there is a easier way to do this however I do not know. Maybe one of you guys can help me out here.

My second issue is that I want different creeps to spawn at each location. I don't want to have just one type of unit spawn in each corner. I want to have a mix of units in each corner, lets say an ogre, kobold, troll, and a spider for example. The problem is that when I make an action that creates 5 units of a random creep in the northwest corner of lets say level 1 it creates level 1 units but they are all the same unit. In order for me to get around this I had to make 4 unit creation actions at each corner to get a mix of units, just creating less units for each action.

My final problem is with using the option to spawn a random creep of a certain level. It only will create random creep units of the tileset that I am using which is cityscape. Is there a way around this or am I going to just have to assign specific units to get the nice mixture that I'm looking for. I wouldn't mind doing this however its very time consuming and it doesn't give the random effect which adds a little more fun to the map.

Sorry for the long post guys but like I said I'm still learning triggers and I wanted to explain all this thoroughly so you would understand.

thanks,

Oxide.
12-12-2003, 07:38 PM#2
Hunter0000
1. Detect when the computer has no food, then trigger the next level that way.

2. If you want them random that way, instead of haveing one trigger that says make 5, youl need 5 that say make 1.

3. I would recomand making unit groups for each level, that is the easyest way.

Welcome to the forums, I hope you have a good learning ecperiance with your map!
12-12-2003, 08:20 PM#3
Corporate_Oxide
Hey thanks for the info Hunter0000. I have one more question though, where do you set up unit groups? Is that in the triggers or the object editor? I didn't even know that option existed.
12-12-2003, 08:32 PM#4
Hunter0000
ok make a unit group array varable with the size of your number of levels

now, on initalization, say add (unit 1 for level 1 type) to levelarray(1)
do that for each random unit for level one
then on, say add (unit 1 for level 2 type) to levelarray(2)

and repeat for each level, it takes a while but you only need it once.
12-12-2003, 10:00 PM#5
AllPainful
To elaborate on the 5 triggers making one unit each... I think Hunter might mean something like this:
Code:
Event
  Player # (your pathing units owner here) food used equals 0
Condition
Action
  Do loop for integer a from 1 - 5
    Loop - Actions
      Create 1 random level # unit at position [color=red]***[/color]
12-13-2003, 01:15 AM#6
Hunter0000
Yess thats what I generly mean when I say "do that for each level" or so, I keep forgetting to say use a loop! lol