Need trigger path please.

BlightWarden

New Member
Reaction score
6
>That spawns them in mass.

Are you kidding me? Why do you think you have a condition that checks if they're dead?
Stop thinking we don't know what we're talking about, please...

BTW remove the "Skip remaining actions" since it will prevent the leak from being removed...

First, relax. I never said you didn't know what you were talking about. I was only relaying what happened when I used it.

Second. Will adding a condition interrupt any of the conditions in the If/Then/Else action trigger?

Third. No idea what condition to use with the periodic. Can I just use
Trigger:
  • (Number of units in Temp_Group_A1) Equal to 0


again without it screwing anything up?
Thanks.

[edit] well that didn't work. Maybe dying unit? Lets find out.

Nope, that didn't work and neither did matching unit is dead. lol. Also tried (Number of living Cedar Wretch units owned by Neutral Hostile) Equal to 0
but that didnt work.
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
You don't need to change anything, just the event to a periodic event.

Edit: oh your variable is set wrong. Remove "(Number of living (Unit-type of (Matching unit)) units owned by Neutral Hostile) Equal to 0)" in the first line

Your trigger should look like this:
Trigger:
  • Creep Spawn trigger template Copy
    • Events
      • Time - Every 5.00 seconds of game-time
    • Conditions
    • Actions
      • Set Temp_Group_A1 = (Units in F1CedarRegion1 <gen> matching ((Unit-type of (Matching unit)) Equal to Cedar Wretch
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Temp_Group_A1) Equal to 0
        • Then - Actions
          • Unit - Create 4 Cedar Wretch for Neutral Hostile at (Center of F1CedarRegion1 <gen>) facing Default building facing degrees
        • Else - Actions
      • Custom script: call DestroyGroup(udg_Temp_Group_A1)
 

UndeadDragon

Super Moderator
Reaction score
447
I forgot, in mine, you also need to add a second event for Map Initialization, so it runs at map init and when the countdown timer expires.
 

BlightWarden

New Member
Reaction score
6
You don't need to change anything, just the event to a periodic event.

Edit: oh your variable is set wrong. Remove "(Number of living (Unit-type of (Matching unit)) units owned by Neutral Hostile) Equal to 0)" in the first line

Your trigger should look like this:
Trigger:
  • Creep Spawn trigger template Copy
    • Events
      • Time - Every 5.00 seconds of game-time
    • Conditions
    • Actions
      • Set Temp_Group_A1 = (Units in F1CedarRegion1 <gen> matching ((Unit-type of (Matching unit)) Equal to Cedar Wretch
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Temp_Group_A1) Equal to 0
        • Then - Actions
          • Unit - Create 4 Cedar Wretch for Neutral Hostile at (Center of F1CedarRegion1 <gen>) facing Default building facing degrees
        • Else - Actions
      • Custom script: call DestroyGroup(udg_Temp_Group_A1)


Nope, that didn't work either. It no longer spawns massive amounts of units, but it doesnt respawn either.

Trigger:
Trigger:
  • Creep Spawn trigger template Copy Copy
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group_A1 = (Units in F1CedarRegion1 <gen> matching ((Unit-type of (Matching unit)) Equal to Cedar Wretch))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Temp_Group_A1) Equal to 0
        • Then - Actions
          • Unit - Create 4 Cedar Wretch for Neutral Hostile at (Center of F1CedarRegion1 <gen>) facing Default building facing degrees
        • Else - Actions
      • Custom script: call DestroyGroup(udg_Temp_Group_A1)
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Try this:
Trigger:
  • Creep Spawn trigger template Copy Copy
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group_A1 = (Units in F1CedarRegion1 <gen> matching ((Unit-type of (Matching unit)) Equal to Cedar Wretch) and (((Matching Unit) is Alive) Equal to True))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Temp_Group_A1) Equal to 0
        • Then - Actions
          • Unit - Create 4 Cedar Wretch for Neutral Hostile at (Center of F1CedarRegion1 <gen>) facing Default building facing degrees
        • Else - Actions
      • Custom script: call DestroyGroup(udg_Temp_Group_A1)
 

BlightWarden

New Member
Reaction score
6
I could Kiss YOU! But I won't ;)

Try this:
Trigger:
  • Creep Spawn trigger template Copy Copy
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group_A1 = (Units in F1CedarRegion1 <gen> matching ((Unit-type of (Matching unit)) Equal to Cedar Wretch) and (((Matching Unit) is Alive) Equal to True))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Temp_Group_A1) Equal to 0
        • Then - Actions
          • Unit - Create 4 Cedar Wretch for Neutral Hostile at (Center of F1CedarRegion1 <gen>) facing Default building facing degrees
        • Else - Actions
      • Custom script: call DestroyGroup(udg_Temp_Group_A1)


Thank YOU very much! It finally works perfectly! +Rep (wish I could +++++Rep you!)

I have one other question, if I may. Can I reuse the same Variable for all my respawn triggers or should I make a new variable for each respawn trigger?

A thousand thank yous to bOb666777!!!!!:thup::thup::thup:


PS: To a mod, This trigger shoud be added to a section for later use as it is useful for respawning the same creeps in different regions and, as far as I know, it doesn't leak.
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
1) You can use the same variable if you don't use waits between setting it and destroying it.
2) It leaks a location. Here's the leakless trigger:
Trigger:
  • Creep Spawn trigger template Copy Copy
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group_A1 = (Units in F1CedarRegion1 <gen> matching ((Unit-type of (Matching unit)) Equal to Cedar Wretch) and (((Matching Unit) is Alive) Equal to True))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Temp_Group_A1) Equal to 0
        • Then - Actions
          • Set TempPoint = Center of F1CedarRegion1 <gen>
          • Unit - Create 4 Cedar Wretch for Neutral Hostile at TempPoint facing Default building facing degrees
          • Custom Script: call RemoveLocation(udg_TempPoint)
        • Else - Actions
      • Custom script: call DestroyGroup(udg_Temp_Group_A1)


TempPoint is a Point variable.
 
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