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)
 
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.
 
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 :)
 
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
 
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....
 
You don't need the if/then as it won't do anything if the building can't produce the unit.
 
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
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      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