• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Limited Spawn

Status
Not open for further replies.
Level 12
Joined
Mar 24, 2011
Messages
1,082
I want to create a trigger which respawns dead units
I got the respawn part, but i cant make the it stop:vw_death:.
I want it to stop when there are 3 units.
Pls help.
Thats the revive trigger
  • Germ maker2
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
      • (Triggering unit) Equal to Germ 0065 <gen>
      • (Triggering unit) Equal to Germ 0066 <gen>
      • (Triggering unit) Equal to Germ 0067 <gen>
    • Actions
      • Wait 5.00 seconds
      • Unit - Create 1 Germ for Neutral Hostile at (Random point in Germ2 <gen>) facing Default building facing degrees
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 001
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Footman 0019 <gen>
          • (Triggering unit) Equal to Footman 0020 <gen>
          • (Triggering unit) Equal to Footman 0021 <gen>
    • Actions
      • Wait 2.00 seconds
      • Set Point = (Random point in *region*)
      • Unit - Create 1 *unit type* for Neutral Hostile at Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Point)
 
Maker, you forgot the limit part :p
  • Tr
  • Events
    • Unit - A unit owned by Neutral Hostile Dies
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Triggering unit) Equal to Germ 0065 <gen>
        • (Triggering unit) Equal to Germ 0066 <gen>
        • (Triggering unit) Equal to Germ 0067 <gen>
  • Actions
    • Unit Group - Remove (Triggering unit) from GermGroup
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Number of units in GermGroup) Less than 3
      • Then - Actions
        • Wait 2.00 seconds
        • Set Point1 = (Random point in Germ2 <gen>)
        • Unit - Create 1 Germ for Neutral Hostile at Point1 facing Default building facing degrees
        • Unit Group - Add (Last created unit) to GermGroup
        • Custom script: call RemoveLocation (udg_Point1)
      • Else - Actions
GermGroup is a Unit Group variable.
 
Level 9
Joined
Apr 25, 2009
Messages
468
Erm...last, how to make those 2 :
  • Set Point1 = (Random point in Germ2 <gen>)
  • Custom script: call RemoveLocation (udg_Point1)
Note:+rep to evryone xD.

Pont1
- Go to "Variables" and create a new Variable.
Name it whatever you want to but the type should be Point.
A Point Variable can also be called a "Location".

Custom Script

- Create a new action of type "Custom Script".
Add this text: "RemoveLocation (udg_VARIABLE)"
The "VARIABLE" features the name of the "Point" variable you made in the previous step. This custom script will remove the variable, making it leakfree.

I hope that clears it out for you.
If not, reply or send a PM to me or any other experienced triggerer.
Thank you for reading.
 
Status
Not open for further replies.
Top