Spawn Creeps Help?

MicroSheep

New Member
Reaction score
3
Okay so i want every 2 seconds of gametime, i want a random pokemon to spawn in a particular area. So i put
Set GrassPokemon=Unit Of type Bulbasaur
Set GrassPokemon=Unit Of type Ekans
Etc to put the pokemon in a unit group.
But then when i put "Pick Every unit in GrassPokemon and do (Unit - create 1(unit of (random unit in GrassPokemon) for neutral Hostile In a random position in region 52.)

Whats wrong with this trigger?
I use GUI and im not very good with triggers..
I have set some variables sch as Unit-type GrassPokemon
GrassSpawnTriggersInterger As the Interger Variable.

Thanks in Advanced
 

FireBladesX

Eating my wings!
Reaction score
123
You could use an array (click the array box, type in the number), with GrassPokemon [1] being Bulbasaur, GrassPokemon [2] being Ekans, and so on.
Then, when spawning, do Unit - create 1 GrassPokemon [random number between 1 and 10*] for Neutral Hostile at Random point in Region.


...Is GrassPokemon a unit-group variable or a unit-type variable? My method uses unit-type.

*This is the maximum number of creeps in the random array.
 

MicroSheep

New Member
Reaction score
3
Its a unit group. But im kinda confused with this array, because i know how to set the array to something on the unit group, but each pokemon i dont know.
 

FireBladesX

Eating my wings!
Reaction score
123
I meant you should instead use a unit-type array. At map initialization, you set each grass pokemon to a number.

Set Grass [1] = Bulbasaur
Set Grass [2] = Ekans
Set Grass [3] = Oddish

And so on. Then, you create a random Grass unit-type.
 

MicroSheep

New Member
Reaction score
3
I meant you should instead use a unit-type array. At map initialization, you set each grass pokemon to a number.

Set Grass [1] = Bulbasaur
Set Grass [2] = Ekans
Set Grass [3] = Oddish

And so on. Then, you create a random Grass unit-type.

Okay iv done this. i put Set Grasspokemon [1] = Bulbasaur
Etc.

Is it pick every unit in grasspokemon?? Because i can do a random number from 1-8 in that standard.
 

FireBladesX

Eating my wings!
Reaction score
123
You don't pick every unit in anything. You just do Unit - Create Unit facing angle, then when picking your unit click on the variable instead of a unit.
 

MicroSheep

New Member
Reaction score
3
awww i did everything you said. and it looks right, but it still doesn't work.
Ill write what i have so far.
GrassPokemon is a Unit-type.
so i have Set GrassPokemon[1]= #01Bulbasaur
Set GrassPokemon[2]= Ekans
Etc.
(up to GrassPokemon[9])

Then i have
Events
Every 2 seconds of Gametime
Conditions
Actions
Unit-Create 1 GrassPokemon[(random Integer number between 1 and 9)] For neutral hostile at (Random Point in Grass Area).

thats what i have. Is it wrong?
 

MicroSheep

New Member
Reaction score
3
um is there a way to make the levels range?? like 1 spawns at level 2 and another spawns at level 4? up to a certain level..
 

Nogusta

New Member
Reaction score
1
um is there a way to make the levels range?? like 1 spawns at level 2 and another spawns at level 4? up to a certain level..

There's a separate action trigger somewhere in the list that sets the level of a hero. Just apply a random level to the unit right after its created.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top