Creeps Spawning

Omnizohar

New Member
Reaction score
0
I want to know how to make a trigger that in X Region they'll spawn creeps every 5 minute. And I want to make it that if the creeps is still alive in 5 minute or untouched, no creeps will be spawned until they're killed and wait for next 5 minute. Sorry if this is hard to explain but I'm sure you guys might understand. Thanks for your help.
 

PrisonLove

Hard Realist
Reaction score
78
Code:
Event
    every 300 seconds of game time

Conditions
    Number of units in (Playable Map Area) matching condition (matching unit     belongs to (neutral hostile)) equal to zero

Actions
    create 1 (your unit) at center of (Region X) for (neutral hostile)

something to that effect

edit: the only problem with my trigger is that if there are still units when 300 seconds is up, then it will wait another 300 seconds until more units spawn. im not sure if thats what you want.
 

Omnizohar

New Member
Reaction score
0
Well after 300sec is up and there is still creeps in area, then no creeps will spawn. If here are no creeps in area and 300sec is up, the creeps will spawn. Well that is pretty much how I can explain it.
 

PrisonLove

Hard Realist
Reaction score
78
well with my trigger it works like this

300 secs pass.
if no units in area
then create units
else if there are units in the area
then wait 300 seconds and try again

once again im not sure if thats what you want but this will get you on teh right track regardless
 

Razed

New Member
Reaction score
44
I think these triggers will work...

Code:
Spawn
    Events
        Time - Elapsed game time is 300.00 seconds
    Conditions
    Actions
        Unit - Create 10 Spider for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
        Wait 0.01 seconds
        Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Spider) and do (Unit Group - Add (Picked unit) to Unit_Group_Variable)
        Trigger - Turn on Spawn 2 <gen>

I added all created units to a Unit_Group variable. And turned on the second trigger, which is...

Code:
Spawn 2
    Events
    Conditions
    Actions
        Wait 299.99 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (All units of Unit_Group_Variable are dead) Equal to True
            Then - Actions
                Unit - Create 10 Spider for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
                Wait 0.01 seconds
                Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Spider) and do (Unit Group - Add (Picked unit) to Unit_Group_Variable)
                Trigger - Run (This trigger) (ignoring conditions)
            Else - Actions
                Do nothing

I have 'Wait 299.99' seconds because I have a Wait 0.01 seconds in the trigger itself.

Untested, but will probably work. :thup:
 

Omnizohar

New Member
Reaction score
0
Well what you said pretty much explain what I wanted. Since I'm such a new person at World Editor, I want to know what Condition do you used to make your trigger work? All these Condition triggers confuse me and I don't know the right one to use.
 

Razed

New Member
Reaction score
44
Boolean Comparison;
Change '((Triggering unit) is A structure)' to 'All units of Unit_Group_Variable are dead' which can be found at 'Unit Group - Units Of Unit Group Are Dead'.

Viola, you're done (I hope ;))
If you have any more questions, or something is not clear, please tell.
 

Omnizohar

New Member
Reaction score
0
I think these triggers will work...

Code:
Spawn
    Events
        Time - Elapsed game time is 300.00 seconds
    Conditions
    Actions
        Unit - Create 10 Spider for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
        Wait 0.01 seconds
        Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Spider) and do (Unit Group - Add (Picked unit) to Unit_Group_Variable)
        Trigger - Turn on Spawn 2 <gen>

I added all created units to a Unit_Group variable. And turned on the second trigger, which is...

Code:
Spawn 2
    Events
    Conditions
    Actions
        Wait 299.99 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (All units of Unit_Group_Variable are dead) Equal to True
            Then - Actions
                Unit - Create 10 Spider for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
                Wait 0.01 seconds
                Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Spider) and do (Unit Group - Add (Picked unit) to Unit_Group_Variable)
                Trigger - Run (This trigger) (ignoring conditions)
            Else - Actions
                Do nothing

I have 'Wait 299.99' seconds because I have a Wait 0.01 seconds in the trigger itself.

Untested, but will probably work. :thup:


Sorry if I'm double posting but I want to say I have problems with the trigger you gave me. For some reason my creeps will just keep spawning and spawning even though they're alive. And instead of using Player X in the trigger I used Neutral Hostile.
 

Razed

New Member
Reaction score
44
Post the triggers you have now, at the moment.

EDIT: Maybe you should try to make Player 12 your enemy, and use that one in the trigger. Just a suggestion.
 

Omnizohar

New Member
Reaction score
0
I tried using Player 12 and yeah same thing happened as when it was Neutral Hostile. Anyway my current trigger:

JASS:

CreepsSpawn
 &gt;Event
   &gt;Time - Every 300.00 seconds of the game time
&gt;Condition
&gt;Action
   &gt;Unit - Create 4 Wild Taurens for Player 12 (Brown) at (Random point in X Region &lt;gen&gt;) facing Default building facing degrees
   &gt;Unit Group - Pick every unit in (Units owned by Player 12 (Brown)) and do (Unit Group - Add (Picked Unit) to Unit_Group_Variable)
   &gt;Trigger - Turn on CreepsSpawn2 &lt;gen&gt;


Anyway my Variable is a Unit Group type with no Array. Its also Initial Value is Empty Unit Group (Default). Just letting you know in case this maybe the problem.

JASS:

CreepsSpawn2
&gt;Event
&gt;Condition
&gt;Action
   &gt;Wait 299.99
   &gt;If (All Condition are True) then do (Then Actions) else do (Else Actions)
     &gt;(All units of Unit_Group_Variable are dead) Equal to True
   &gt;Then - Action    
     &gt;Unit - Create 4 Wild Tauren for Player 12 (Brown) at (Center of X Region &lt;gen&gt;) facing Default building facing degrees
     &gt;Wait 0.01 seconds
     &gt;Unit Group - Pick every unit in (Units owned by Player 12 (Brown) of type Wild Tauren) and do (Unit Group - Add (Picked unit) to Unit_Group_Variable)
     &gt;Trigger - Run (This trigger) (ignoring conditions)


Damn not use to writing all this long trigger.
 

Razed

New Member
Reaction score
44
Use 'Code tags' for your trigger, though.

But add Wait 0.01 seconds at...
Action
Unit - Create 4 Wild Taurens for Player 12 (Brown) at (Random point in X Region <gen>) facing Default building facing degrees
Wait 0.01 seconds
Unit Group - Pick every unit in (Units owned by Player 12 (Brown)) and do (Unit Group - Add (Picked Unit) to Unit_Group_Variable)
Trigger - Turn on CreepsSpawn2 <gen>

At the end of the second trigger: 'Trigger - Run (This trigger) (ignoring conditions)'
Try to change this to '(checking conditions)'.

I feel kinda dumb, you must of course check the conditions if the units are dead, silly me.

Try this, hopefully it will work.
 

Omnizohar

New Member
Reaction score
0
For some reason it didn't change a thing. I did exactly what you told me to do (adding the extra wait and changing the trigger running to check condition).
 

Razed

New Member
Reaction score
44
I am really confused at the moment :confused:

I don't want to force you, but maybe if I can take a look in your map I'll be able to fix it. But I don't know if you can post it public or maybe there is a way to send it privately?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top