Here at these forums we believe is for the best if you try to do one and we help you with your problems, instead of giving you the whole thing already done.
Also please specify your request, spawn creeps where? how many? for what? are they supposed to attack something? move somewhere? are you making a TD?
Make a region in which you want the creeps to spawn. Event, every x seconds, create unit at random point in region.
OOOH Random creeps. Hmm. Ya make a unit array and set the creeps you want to each array integer. and then instead of create unit, create a random integer from that unit array.
well, I'm making a map where you catch random hero creeps and level them. So, there are different types of creeps in a region. And every region has different creeps with specific abilities, strengths and weaknesses. So I just need to get a good spawning system in which you can spawn x amount of creeps every x seconds....
now my problem is: how can I set a unit array [x] to a specific unit that still has to be spawned?
well, to let creeps spawn randomly I have to make a unit array. When I make one (for example array 5) I want to make unit array [1] be a archmage, array [2] be a bloodmage etc. Every time i want to set the variable, I have to select a unit that's already on the map, and if I delete the unit, the variable is no longer valid. So, I want to set the variables onto units that are not on the map...
Actually, an example of a "Unit-type" would be footman, peasant, archmage, etc. In other words, unit-type represents a type of unit.
Unit variables refer to specific units that already exist; unit-types are what you select when you say to "create number of units of unit-type in location", for example.
oooh like that. thanks, i can select them now, but how do I let them spawn at random?
with that, I mean this;
every 30 seconds of game time, I want to create 5 heros into the region. How can I let the editor select 5 heros at random in a variable, which has 14 different kinds of heros in it.... anyone who has some kind of trigger that does that??
So you are going to firstly want to create a Unit-Type Array, and set all the different unit-types you want into the array, like this:
Trigger:
Trigger 1
Events
Map initialization
Conditions
Actions
Set UnitTypeArray[1] = Paladin
Set UnitTypeArray[2] = Archmage
Set UnitTypeArray[3] = Mountain King
Set UnitTypeArray[4] = Blood Mage
...
Set UnitTypeArray[X] = Warden
X would be the total number of unit-types, the number you arrive at after you have all the different unit-types you want stored in the array. Then you would make a second trigger to look like this:
Trigger:
Trigger 2
Events
Time - Every 30.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
Unit - Create 1 UnitTypeArray[(Random integer number between 1 and X)] for Neutral Hostile at (Center of Your Region <gen>) facing Default building facing degrees
X again being the total different number of unit-types. This trigger will create 5 units every 30 seconds with a random unit-type from the list made in the first trigger.
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.