Spawn Triggers.

Saintbob

New Member
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.
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
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.
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
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
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
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
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
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.
  • The Helper The Helper:
    they did not winterize any of the plants and they froze
  • The Helper The Helper:
    it is not that power consumption went up it was available capacity went down with power plants freezing
  • Varine Varine:
    What a fucking disaster. Are all of the Texas people okay? I see TH is, are we the only two?
  • Varine Varine:
    How have the other states held up? I just got power back so I have no idea what's going on, we didn't get warning
  • Varine Varine:
    Why the fuck didn't they fix this ten years ago when it happened?
  • Blackveiled Blackveiled:
    I'm in it with you and TH as well. My power has been in and out, and I have a ruptured pipe that I need to fix, shouldn't be too bad to fix myself.
  • Varine Varine:
    I hope you're staying warm! Apparently the supply is coming up so hopefully we can get back to normal power soon, mine has been on for six hours now.
  • M Mulciberxp:
    My power has been off most of the last 2 days. We had a generator installed 3 years ago though, so we're staying warm. Water is another issue...
  • The Helper The Helper:
    Where I live has a pool so we are using that to get water to flush the toilets. We have enough bottled water to drink and brush teeth and stuff but it has been a few days and no shower though....
  • Varine Varine:
    I had some water in gallon jugs, and got our water back on yesterday. We don't seem to have any leaks, but I haven't crawled down there to look yet.
  • The Helper The Helper:
    still no water I cannot remember when I last showered now I know how they felt in the old west lol
  • Varine Varine:
    My poor plants are happy, they aren
  • Varine Varine:
    aren't used to going this long without water or lights or normal heat. I think a couple of them froze, but they look like they'll make it
  • Varine Varine:
    Well one of them is pretty rough but I think it was sick to begin with, that one always had some problems.
  • jonas jonas:
  • jonas jonas:
    ???
  • Ghan Ghan:
    That is such a Texas thing to say lol
  • midnight8 midnight8:
    a positive could come out of this. So many people trapped at home could put a dent in the covid numbers in Texas
  • Varine Varine:
    That dude, Tom Boyd, is really upset about the backlash from his "it's your fault you're freezing" thing because he claims he resigned before saying it, so it wasn't like he said it in his official capacity or anything.
  • jonas jonas:
    Almost as if he was saying "screw you guys, I'm going home"
  • Varine Varine:
    I'm fairly new here still but that seems to be the analogous message by several of our politicians.
  • vypur85 vypur85:
    Nobody?
  • jonas jonas:
    Hi vypur85, long time no see
  • tom_mai78101 tom_mai78101:
    Hi vypur85, long time no see.
  • The Helper The Helper:
    We are all somebody

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome
    Top