HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

need help wth creeps

09-01-2004, 12:50 AM#1
red_enferno
I want to spawn creeps witch i know what to do but i do not want them to spawn if there are alrdy creep there. anyhelp?
09-02-2004, 02:37 AM#2
duckduck
You need a unit group variable.

Click the orange x
Click the green x
Name the variable
Click the scroll bar and scroll to Unit Group
Click Ok
Click Ok

I think your going to need arrays in this so use arrays. Each array # can be used for a different thing for the same variable type. Ex. Putting an array in a unit group, you can a bunch of gnolls to (Unit Group Variable) [1] and have a bunch of satyrs to (Unit Group Variable) [2]. This way you don't have to make so many different variables.

Trigger
Code:
Events:
  Every (how long) seconds
Conditions:
  # of units in (Unit Group Variable) = 0
Actions:
  Create creeps
  Set (Unit Group Variable) = Last created unit group
09-03-2004, 07:42 PM#3
BuRnInSpartan
yes you do need arrays which is below variable type set it to how many units that are going into the unit group (i think)
09-03-2004, 08:09 PM#4
Unknown6
i'd prefer:

events

A unit dies

conditions

actions

unit group - pick every units in region [mycreeps] and do actions
|-|- if - conditions
|-| picked unit is alive = false
|-|- then - actions
|-| unit group - create [number] [units-type of[creeps]
|-|- else - actions

or:

let's consider that the following trigger already happened:

event- unit dies
condition - dying unit [from region[myCreeps]]
actions - run trigger [check creeps]

now, the [creck creeps] trigger:

events (no event)

conditions [boolean] (every units in region owned by player) is alive = false

actions

|-| unit - create [number] [unit-type of[creeps] in region [mycreeps]

That should work. Just fill in the values and it's done.