Trigger

zll7

New Member
Reaction score
17
I dont know if this is possable...but ive been trying to make a trigger so that around a building (which you can build) a unit spawns every so many seconds. Any help would be appretiated.
 
Unit Spawning

Hello zll7.

Sd Ryoko posted how to do this. It is wrather easy. I'll walk you through it.

The first thing you have to do my friend, is place the building on your map.
Then Add a Region around the building.
Now open your trigger Editor.
Add a new category.
Add a new trigger and Name it (unit name) Spawn *example: Footman Spawn*

now fill in your events, conditions, and actions as follows.

Events
Time - Every ## seconds of game time
Conditions - none
Actions
Unit - Create ## (your unit here) for (Player) at (your Region here) facing 0.00 degrees

This event should now spawn units around your building according to the number of seconds you input.

Have fun!!
 
Yes, but he's looking for a way to trigger the spawning units AFTER the building is built. (I think, anyway) It appears he doesn't want it to be preplaced, but rather built by a player, and THEN the spawning will take place...

For now, I'm not 100% sure how to do this, but I'm thinking about it.

If I have it wrong, then sorry.

Alexander
 
...And 56k is a genius! :) However, there's a bit more to it. You're going to have to make two triggers, one to set off the spawning trigger after the barracks is built.

E: A player finished building a building.
C: Building is equal to Barracks <or whatever you want the units to spawn around>
A: Run Spawn, ignoing conditions

Spawn
E: Every X seconds
C:
A: <Im_On_56k's action here>

And that should work. (Thanks for the mental boost, 56k!)

Alexander
Hope it works.
 
Hmm, in trying to create a little test, to see if it works, I couldn't find your the right part for your action, 56k.

"Position of unit-type barracks" <- What action do you use to find that in?

Alexander
Maybe it's more complicated then we thought...
 
Here's the exact triggers about:

Code:
AddToSpawnGroups
    Events
        Unit - A unit Finishes construction
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Triggering unit))  =  FootmanSpawner
            Then - Actions
                Unit Group - Add (Triggering unit) to FootmenSpawners
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Triggering unit))  =  GruntSpawner
            Then - Actions
                Unit Group - Add (Triggering unit) to GruntSpawners
            Else - Actions
Once a building is built, it checks if it is a footman spawner or a grunt spawner, then if its a footman spawner it adds to the footman spawner group, or if its a grunt spawner, it adds to the grunt spawner group. You can add more groups with copy and paste.

Code:
SpawnUnits
    Events
        Time - Every 60.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in FootmenSpawners and do (Actions)
            Loop - Actions
                Unit - Create 5 Footman for (Owner of (Picked unit)) at (Position of (Picked unit)) facing (Position of (Triggering unit))
        Unit Group - Pick every unit in GruntSpawners and do (Actions)
            Loop - Actions
                Unit - Create 5 Grunt for (Owner of (Picked unit)) at (Position of (Picked unit)) facing (Position of (Triggering unit))

Every 60 seconds of the game, it picks all the footman spawners and spawns 5 footman for them and picks all the grunt spawners and spawns 5 grunts for them. You can add more with copy and paste.

If you want those units to move somewhere, like automatically attack the enemy, just tell me and I'll add those actions in if you don't know how.
 
test
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area)((Unit-type of (Picked unit)) Equal to Barracks)) and do (Actions)
Loop - Actions
Unit - Create 1 Footman for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing (270.0) degrees
 
Lol, NEVERMIND! :D Wow, Demonfaze, I've noticed you've been quite busy lately. (70+ posts in 2 days! :eek: ) And you're apparently good with triggers...Cool! :) Welcome to the forum, and thanks for setting me and 56k straight! ;)

Alexander
 
Alexander: Thanks for the welcome :cool:.

56k: Yes, but I'm used to avoiding setting unit groups at periodical events because they create too much memory leaks.

I know I have leaks with the regions that I could remove, but for simplicity's sake (and I don't think they are as bad as unit group leaks) I just made them the "simple" way.

-Demonfaze
 
wow, i'm trying to recreate his triggers just for the experience, and haha i'm havin a hard time finding everything....

i'm determined though =)
 
Haha, determination & patience are like the two most important things in map making (experience with the editor comes in third).

The first two are "If/Then/Else (multiple Actions)" and inside the "If" is a unit comparison, the "Then" is are Unit Group - Add Unit and the Unit Group it adds them to is a variable with the type of "Unit Group". and the "Else" is just blank.

The next trigger has two "Unit Group - Pick Every Unit in Unit Group and Do (Multiple Actions)" And inside are just "Unit - Create Units facing Point" Conditions inside those should be pretty easy to find.
 
I figured it out. Man o Man the things you can do with triggers are just mind boggling....and this whole trigger was a wrather easy one to make. I would hate to see a difficult one.

Reminds me of when I use to edit Dungeon Seige......@#$@# pains in my @#$@#

/trigger Add Demonfaze to friends list
You have added Demonfaze to your friends list!
You have 1 friend!
You have improved at socializing (1)!
 
Haha ;).

You can go to the Omnislash thread that was being posted in yesterday, the trigger I put there was like 10 times as long as this one... (and 10 times as hard)

-Demonfaze
 
My comprehenstion level for what the triggers do, boolean, comparrison, all those kinds of triggers is low.

So I am limited to what I can do because I do not understand those things.

Hence why I need you all, your my support, my feet. Don't worry, when I take a !@#$ I clean it up.

:banghead: Break it down :banghead:
 
zll7: no prob, thats what this forums is for! ;)

Kaerwynd: don't worry, you're a lot better than tons of people I've seen. IE: People looking for the "Create a TD button" :D
 
OMG there is a button for creating TD?!?!

where?!?!??!?!

Is there a button for creating Dota maps??!?!?!?!
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    It's actually remarkably easy to make mayonnaise though. Fun fact, it USED to kind of be a French mother sauce. I believe that Careme considered it one, it may have been aioli but that has also built a different meaning than it used to. An aioli is just mayonnaise I mixed with other shit typically, I didn't start it don't come at me
  • Varine Varine:
    It's very hard to do it on a large scale though
  • Varine Varine:
    Depending on how you pour the oil the consistency can vary wildly, but that's true for most emulsions. I can only make about two quarts at a time with my robo coup, and if I have to make several in series because I forgot to order it becomes really obvious even when I do it. We have to wait and mix them all together to make sure we have the same thing.
  • Varine Varine:
    Hollandaise is also kind of like that, emulsions require a very steady hand to do exactly the same every time.
  • Varine Varine:
    Luckily I live in an age with electricity so it's way fucking faster, but when I was just a boy trying to find my place I had some hardcore chefs that made use do things like that by hand. It is WAY easier to get right by hand because you control it and can feel it, but it takes soooooo much longer. And on the scale a modern kitchen requires... I serve 400-500 guests on average per day right now, if I had 100 then we could do things way better
  • Varine Varine:
    But we can't do that. In the winter yeah, but I HAVE to get people through here right now so I can afford the staff that we CAN do that. We have about 100 days of summer, and if that summer doesn't make us what it will, then I can't operate the other most of the year with my staff. The owner is talking about closing two days a week to cut down on labor, I told him he should cut down on vacations and it did not go great. I do think I won though, I have to keep my fucking core staff and they have to be gainfully employed
  • Varine Varine:
    Sure some of them might take a second job, but I can't just cut my entire staff to unlivable hours, nor can I can cut them off all winter if I want them to come back.
  • Varine Varine:
    And also, there is no fucking way I'm pulling these hours come september. I only do this right now because I have to, the second I don't have to be the one doing it I won't be
  • Varine Varine:
    I have a 5 person core staff in the kitchen, not including me or Chef Ben
  • Varine Varine:
    Though two of those people are likely not making it this year. One of them has been replaced, the other I am kind of trying to. He's being a giant bitch, today I had to get onto him because in the three hours before I left he had taken like thirty minutes for cigarette breaks
  • Varine Varine:
    And he was also complaining to me the other day that he was out of weed so couldn't smoke any before work that day, and was confused about why I was annoyed he was telling me, his boss, that he is smoking weed everyday before work.
    +1
  • Varine Varine:
    Like yeah I can tell. I don't need to fucking know.
  • Varine Varine:
    So now he's getting scrutinized and will not be top of the list. I know I don't have the smartest people but I do expect them to have some common fucking sense
  • Varine Varine:
    I did do a rare thing for me and hire a girl last month without warning. Everyone was made at me because I started her at like 21, but she worked with me before and I was like don't care. She made 19 at her old job and I wanted her to come work with me, she is the best
    +1
  • Varine Varine:
    I'm going to get her a raise at the end of the summer. She wants to go to school again, but I want her to still work with me so.... she kind of can just tell me what the price is. I can go to 25 if she keeps up. I need to get her onto line more, that's what she wants, but I need her where she is and it's not fair that she doesn't get the little bit of raise that comes with it. She can do it no problem, I've worked with her there.
  • Varine Varine:
    It's just hard to move and train people unnecessarily right now. And also the line fucking sucks, it's not any more fun. This is turn and burn so I have the bankroll, and everyone suffers for it
  • Varine Varine:
    Eventually we'll get it balanced, we'
  • Varine Varine:
    we're starting online orders and stuff, but I also turn that off all the time because I barely keep up trying to be the best at Sysco shit
  • Varine Varine:
    I think it's gonna be a good fall and winter though. We're going to have a good staff, they will get along, they will be able to manage the workload and the complications, they know how to really cook this year, like every person on line knows their steak temps. Some of them use thermometers a lot and they don't always use them right, but they do know how to do it. Failure, especially in this field, is the only way to get better. They'll get it
  • Varine Varine:
    They won't get feel down while they do the thermometer, but we didn't have an instant read probe when I was learning. Like they did but god knows how off it is, you HAD to do it by feel. Even if the chef was fine with me bringing my own, it takes too long. Poke and know
  • The Helper The Helper:
    420 threads in the Artificial Intelligence forum :)
  • The Helper The Helper:
    Happy Monday!
    +1
  • The Helper The Helper:
    and then it was Tuesday!
    +1
  • The Helper The Helper:
    fyi I am going out of town to lake somewhere in bfe texas for the weekend will be gone Friday morning to sunday afternoon for a paranormal thing and some rest peace

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top