This is how to spawn Units when you build a structure!!

Status
Not open for further replies.

editor_kid

New Member
Reaction score
11
This is a tutorial on how to spawn units when you finish building a structure

Trigger:
  • Event
    • Time-Every 30.00 seconds of game time
    • Condition
    • Action
      • Pick every player in {All Players}and do {Action}
        • Loop Actions
          • If {all conditions are true}then do {Then Action} and {Else Actions} If-Condition
            • {Unit-Type of(Picked Unit)}Equal to Barracks
            • Then-Actions
              • Unit-Create 1 footman for {Picked Player} at {Position of {Picked unit}} Facing default Building Degrees
            • Else-Actions





This trigger is leaking use the one below
(It is a Picture)

:thup:

3841969754_027eed5726.jpg


Variables Used Here

Unit-Type Variable (Units)
Point Variable (point)
Player Group Variable (Player_Group)
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
1. This trigger leaks. Take a look at this tutorial
2. This is stupidly inefficient with all the If/Thens.
3. This is in the wrong section.
 
Reaction score
54
This is a tutorial on how to spawn units when you finish building a structure

Trigger:
  • Event
    • Time-Every 30.00 seconds of game time
    • Condition
    • Action
      • Pick every player in {All Players}and do {Action}
        • Loop Actions
          • If {all conditions are true}then do {Then Action} and {Else Actions} If-Condition
            • {Unit-Type of(Picked Unit)}Equal to Barracks
            • Then-Actions
              • Unit-Create 1 footman for {Picked} at {Position of {Picked unit}} Facing default Building Degrees
            • Else-Actions





That is all you have to do..Just follow this trigger!!!:thup:

+rep :)
 

Avaleirra

Is back. Probably.
Reaction score
128
I had an old method that was way more simple than this and did exactly the same thing....had to change it though cuz after the first unit built I wouldn't let me upgrade the building :S
 

Moridin

Snow Leopard
Reaction score
144
I'm not sure if this is a joke or not.....:S.

If this isn't:
1) The trigger leaks.
2) The trigger doesn't even work.....because you're checking for picked units and earlier you pick players....
 

Tru_Power22

You can change this now in User CP.
Reaction score
144
You don't need the if/then as it won't do anything if the building can't produce the unit.
 

Exide

I am amazingly focused right now!
Reaction score
448
I can tell, just by looking at the code, that it doesn't work.

Code:
Pick every player in {All Players}and do {Action} 
Loop Actions

So far so good.

Code:
If {all conditions are true}then do {Then Action} and {Else Actions} If-Condition 
{Unit-Type of(Picked Unit)}Equal to Barracks

Fail.
You are picking players, not units.
You need to use a unit group for picking units (not player groups.)

Code:
Unit-Create 1 footman for {Picked Player} at {Position of {Picked unit}} Facing default Building Degrees

leaks.


The trigger in the picture is pretty much the same.
An even bigger problem with that trigger, though, is that it destroys All Players. -Never a good thing.

It feels like you "borrowed" a trigger created by a noob, modified it a little, and submited it as your own.
Your intentions are problably good, but you fail. :(


EDIT: Bonus; Common sense:
Do not double post.
Do not use exclamation marks excessively.
Do not respond to spam (use -rep, instead.)
 
Status
Not open for further replies.
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top