Automatic Spawners

WorldEdit

New Member
Reaction score
0
I have been trying to create a building in my map that spawns units when a enemy unit has entered a particular region and then sends the units to fight the attacker. The spawns are the enemies just to let you know. So basically im looking for this:

My unit enters region.
Building is alerted to its presence and spawns unit
Units attack my unit

I have tried a lot of things to create this auto spawn thing but it just doesn't seem to work.:banghead: If anyone could enlighten me on this I would be VERY glad. Thanks!:)
 

LiVam

New Member
Reaction score
1
One way of doing the Spawn Trigger:

Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 1 (Red)
    • Actions
      • Unit - Order Barracks 0000 <gen> to train/upgrade to a Footman


You might need a "Unit enters region" event for the trained units, which then triggers them to Attack-Move to the another region, depending on your layout.
Feel free to pm me if anything is unclear :)


+Rep would be much appreciated btw ;)
 

squorpion

New Member
Reaction score
12
One way of doing the Spawn Trigger:

Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 1 (Red)
    • Actions
      • Unit - Order Barracks 0000 <gen> to train/upgrade to a Footman


You might need a "Unit enters region" event for the trained units, which then triggers them to Attack-Move to the another region, depending on your layout.
Feel free to pm me if anything is unclear :)


+Rep would be much appreciated btw ;)

i think he wants it to spawn not train the unit.

here try this

Code:
    Events
        Unit - A unit enters Region 000 <gen>
    Conditions
        (Owner of (Entering unit)) Equal to Player 1 (Red)
    Actions
        Unit - Create 1 Footman at center of region Region 000

i know you didnt mention wanting this but it would probably be usefull.
if you want the spawn created unit to change threw out the game like upgreade from footman to rifle man do this.

create a variable unit array. set 1= footman, 2= rifleman. ect. make a timer that pluses the variable array every 5 minutes (or how ever long you want it to be. or you can set a buiding that upgrades it then make it for that when upgrade is completed it plusses the array) then instead of setting this in the code

Code:
Unit - Create 1 Footman at center of region Region 000

set this

Code:
Unit - Create 1 Unit_Spawn at center of region Region 000

unit spawn beeing the name of the variable.

if you need anymore help you can just pm me and ill help if i can.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Use unit comes with in <ur range> of <ur unit> then in actions create unit at ur bulding then order last created unit to attack entering unit
 

WorldEdit

New Member
Reaction score
0
thanks guys!

Thank you for your help. Im really new to this whole thing so as soon as i get the feel of it all i will be sure to give you guys some rep. :}
 

WorldEdit

New Member
Reaction score
0
Oh lol One Last Thing

Hey the trigger works great but there is one last thing that I wanna ask. The units are spawning, now how do I stop them from spawning? I'm using the spawn units with in region and not training them at a location. I was thinking that maybe there would be a building that would have to be destroyed in order to make the units stop spawning. i will research it in the meantime but if someone could give me a few tips I would appreciate it.
 

HellCraft

Member
Reaction score
19
Trigger:
  • Barracks Death
    • Events
      • Unit - Barracks 0000 &lt;gen&gt; Dies
    • Conditions
    • Actions
      • Trigger - Turn off Spawn Trigger &lt;gen&gt;
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Create another triger. Event unit - unit dies. Condition dying unit eqaul to ur building. Actions trigger - turn of spawning triger
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top