• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Wave trigger doesn't work! Help!

Status
Not open for further replies.
Level 4
Joined
Jan 28, 2013
Messages
94
I made my first wave trigger with arrays! But I don't seem to be able to make it work...

My idea was that when a unit stepped into a region they would get surprise attacked by spiders. It's 5 waves and if the quest isn't completed it'll start all over again. First it's Spitting Spiders for 2 waves and then it's Giant spiders for 2 waves and a Brood Mother as the last wave. But only the first wave triggers. help?

Here's the trigger. It's GUI.
  • Spawn Spiders
    • Events
      • Unit - A unit enters SpiderSpawnEnter <gen>
    • Conditions
      • ((Owner of (Triggering unit)) Equal to Player 1 (Red)) or ((Owner of (Triggering unit)) Equal to Player 5 (Yellow))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WaveCount Equal to 6
        • Then - Actions
          • Quest - Mark OQspiders as Discovered
          • Quest - Display to (All players) the Quest Discovered message: |cFFFFD700Optional ...
          • Quest - Flash the quest dialog button
          • Set WaveCount = (WaveCount - 1)
          • Game - Display to (All players) the text: Debug - Quest disco...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WaveCount Greater than or equal to 4
          • (Number of units in (Units in SpiderSpawnEnter <gen> owned by Player 9 (Gray))) Equal to 0
        • Then - Actions
          • Set TempLoc = (Random point in SpiderSpawn <gen>)
          • Unit - Create 3 Spider[1] for Player 9 (Gray) at TempLoc facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_TempLoc)
          • Set WaveCount = (WaveCount - 1)
          • Game - Display to (All players) the text: Debug - Wave 5 and 4
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WaveCount Greater than or equal to 2
          • (Number of units in (Units in SpiderSpawnEnter <gen> owned by Player 9 (Gray))) Equal to 0
        • Then - Actions
          • Set TempLoc = (Random point in SpiderSpawn <gen>)
          • Unit - Create 2 Spider[2] for Player 9 (Gray) at TempLoc facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_TempLoc)
          • Set WaveCount = (WaveCount - 1)
          • Game - Display to (All players) the text: Debug - Wave 3 and 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WaveCount Greater than or equal to 0
          • (Number of units in (Units in SpiderSpawnEnter <gen> owned by Player 9 (Gray))) Equal to 0
        • Then - Actions
          • Set TempLoc = (Random point in SpiderSpawn <gen>)
          • Unit - Create 1 Spider[3] for Player 9 (Gray) at TempLoc facing Default building facing degrees
          • Set BroodMother = (Last created unit)
          • Custom script: call RemoveLocation(udg_TempLoc)
          • Set WaveCount = 5
          • Game - Display to (All players) the text: Debug - Wave 1 and 0
        • Else - Actions
Btw I added the Count Units of Player in Region to stop the trigger from triggering every time a new unit entered the region.
 
Level 4
Joined
Jan 28, 2013
Messages
94
this may be what ur looking for
  • (Number of units in (Units owned by Player 9 (Gray) matching (((Picked unit) is alive) Equal to True))) Equal to 0
Thanks but that condition doesn't work for me as I plan to place out more units by that player in the map.

Edit.
I solved it in another way via this Remove Unit trigger:
  • Spider remove
    • Events
      • Unit - A unit owned by Player 9 (Gray) Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Spider[1]
        • Then - Actions
          • Animation - Play (Triggering unit)'s death animation
          • Wait 2.00 seconds
          • Set KillPoint = (Position of (Triggering unit))
          • Unit - Create a Spider[1] corpse for Neutral Victim at KillPoint
          • Custom script: call RemoveLocation(udg_KillPoint)
          • Unit - Remove (Triggering unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Spider[2]
        • Then - Actions
          • Animation - Play (Triggering unit)'s death animation
          • Wait 2.00 seconds
          • Set KillPoint = (Position of (Triggering unit))
          • Unit - Create a Spider[2] corpse for Neutral Victim at KillPoint
          • Custom script: call RemoveLocation(udg_KillPoint)
          • Unit - Remove (Triggering unit) from the game
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Spider[3]
        • Then - Actions
          • Animation - Play (Triggering unit)'s death animation
          • Wait 2.00 seconds
          • Set KillPoint = (Position of (Triggering unit))
          • Unit - Create a Spider[3] corpse for Neutral Victim at KillPoint
          • Custom script: call RemoveLocation(udg_KillPoint)
          • Unit - Remove (Triggering unit) from the game
        • Else - Actions
It's a bit cheap but now the main trigger works as it should. If there's a smarter way to solve my problem in the main trigger then I'm all ears.
 
Last edited:
Status
Not open for further replies.
Top