Spawn Triggers.

Saintbob

New Member
Reaction score
2
Hey Guys, im trying to create a map with spawning creeps from 8 points on the edges of my map. Ive done that, but ive only been able to put them on a Time elapsed event.

so as you can imagine i have alot of triggers for my waves, and i only have 5 waves so far and have over 50 triggers.

can anyone explain how i get the waves to spawn after my timer of 60 seconds has got to 0, then for the timer to start again once all creeps are dead, then the 2nd wave to start when the time reaches 0 again.

Any ideas? ive got the leaderboard, ive got the timer working, i've got the regions and the movement in place, its just these darn waves.

Please help someone, or if you can point me in the right direction.

Thanks.
P.S this is a screeny of my Triggers so far...
http://i383.photobucket.com/albums/oo275/Cdawson001/Triggers1.jpg

as you can see i have triggers in Wave 1-40 ghouls
the first trigger spawns 1 ghouls at 8 regions at 60 seconds elapsed game time.
then the 2nd one does the same put at 65 seconds game time.
This continues all the way through the game and waves.

Just so you can see how ive laid it out.
Thanks :D
 

denmax

You can change this now in User CP.
Reaction score
155
And idea that comes to my mind is that as soon as those units are spawned, you add every unit to a unit group. So you should spawn units using the loop action and add them to your unit group via "Add (Last Created Unit). As to why we should use the loop instead of instantly just creating like 50 units in one "spawn trigger" is the fact that (Last Created Unit) will not work on them.

Now that you have that unit group, I think that you'd need another trigger to check every half a second or somesuch if the unit group contains any unit or not. If it doesn't, then the timer restarts and the new units spawn.

You'll only need one unit group variable for this. Heck, no need for arrays.
 

Saintbob

New Member
Reaction score
2
And idea that comes to my mind is that as soon as those units are spawned, you add every unit to a unit group. So you should spawn units using the loop action and add them to your unit group via "Add (Last Created Unit). As to why we should use the loop instead of instantly just creating like 50 units in one "spawn trigger" is the fact that (Last Created Unit) will not work on them.

Now that you have that unit group, I think that you'd need another trigger to check every half a second or somesuch if the unit group contains any unit or not. If it doesn't, then the timer restarts and the new units spawn.

You'll only need one unit group variable for this. Heck, no need for arrays.

Thanks for you're reply, but i didnt understand any of that lol. :(
Everything that ive created so far has been from watching videos on youtube.

How to i go about putting units into a unit group, and getting them to spawn when the time reaches 0?

Thanks once again
 

denmax

You can change this now in User CP.
Reaction score
155
Thanks for you're reply, but i didnt understand any of that lol. :(
Everything that ive created so far has been from watching videos on youtube.

How to i go about putting units into a unit group, and getting them to spawn when the time reaches 0?

Thanks once again

I'm really sorry, I lost my original copy of WCIII (nor do I play it anymore), so I don't have my map editor.

Do you know what variables are? If not, I suggest you read the tutorials about them.

The "unit group" I am talking about is a variable type. Your units should be added to this unit group. It should be an action called "Unit - Add (Last Created Unit) to [yourunitgroup]" every after a unit is created.

And look at your "Trigger 1". You seem to have repeated your "spawn actions", but you can simply just do it with the loop action. If I remember correctly, the action is "For each and every *blahblah* from 1 to [the number of repetitions], do actions"

Let's have an example.

Suppose you want to spawn 10 Moonstahs.
We should now use "

Trigger:
  • Actions
    • For each and every *iforgotwhatwaswrittenhere* from 1 to 10, do actions
      • Do - Actions
        • Unit - Create 1 Moonstah for .....
        • Unit - Add (Last Created Unit) to whateveristhenameofyourunitgroup
    • Game - Display to (All players) the text: "OMIGOD TEN MOONSTAHS!!!!1!1!!!!eleven!!!
 

Saintbob

New Member
Reaction score
2
hey thanks once again for getting back to me, Yeah i know what varibles are.
But im just no good at putting it all together.

I need someone to show me how to do it, or be able to do it for me.
lol.

Thanks for you're help i will see if i can use what you've said and try it out.
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Less freehand but still freehand xD
Trigger:
  • Actions
    • For each Integer A from 1 to 10, do actions
      • Loop - Actions
        • Unit - Create 1 footmen for (Player 1 - Red)
        • Unit - Add (Last Created Unit) to (Temp_Group)
 

Saintbob

New Member
Reaction score
2
ok this is way beyond me guys, thanks for you're help.
But i think im going to create another thread asking for someone to help do the triggers, by me sending them the map.

lol i dont have the IQ for it :D
 

Seprest

New Member
Reaction score
15
Don't make a new thread, just repose your question/request.

Make a variable:

AliveCreeps - Unit Group - Empty Unit Group

Trigger:
  • CreepCounter-Add
    • Events
      • Unit - A unit enters Spawn#1
    • Conditions
    • Actions
      • Unit Group - Add (Triggering unit) to (AliveCreeps)

Trigger:
  • CreepCounter-Remove
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in (AliveCreeps)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Units in (Playable map area)) is empty) Equal to True
        • Then - Actions
          • Countdown Timer - Start (CreepCounter1) as a One-shot timer that will expire in 60.00 seconds
        • Else - Actions


This would work for each player, just copy for each player and change the region to the respective spawn sites, and change the timer to the correct one too.


If you want the timer to start once ALL creeps are dead (not just the ones spawned for a specific player), then add more lines to the
Trigger:
  • Events
    • Unit - A unit enters Spawn#1


And the timer can just be any counter you use to time that 60 seconds till the next spawn.
 

SanKakU

Member
Reaction score
21
i think you should probably use the unit indexing system called AIDS by Jesus4Lyf. i think at one point i was making a map kindof like yours...it was called king of the hill, or king of the forest or something like that. that was so long ago, back when i knew almost nothing about coding. i'll see about using AIDS in that map and give you a report on how it works out.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/

      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