• 🏆 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!

maze trigger problem...

Status
Not open for further replies.
Level 5
Joined
Dec 15, 2009
Messages
145
Well I'm making a maze and used this trigger I found on a tutorial.
  • Events
    • Time - Every 0.05 seconds of game time
  • Conditions
  • Actions
    • Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
      • Loop - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Terrain type at (Position of (Picked unit))) Equal to Barrens - Desert
      • Then - Actions
        • Unit - Move (Picked unit) instantly to (Center of Region 017 <gen>)
      • Else - Actions
        • Custom script: call DestroyGroup(GetLastCreatedGroup())
But...it isn't working for me. When I tested it I stood on the desert for about 30 seconds but it did nothing...Is there anything I'm doing wrong with that trigger, or will I have to spend forever making regions :sad:?
 
Level 9
Joined
Nov 4, 2007
Messages
931
Its because your if/then/else is outside of your Unit Group loop function... well thats how it looks, can't be too sure when your posting your gui trigger with the hive TRIGGER tags.
 
Level 5
Joined
Dec 15, 2009
Messages
145
That's exactly as it was posted on the tutorial (besides the Desert Tile, and move to Region things). What you mean by outside the function? I'm not very good with triggers :hohum:
 
By that, he means to click the "If (All Conditions are True) then do (Then Actions) else do (Else Actions)", and drag the entire thing under "Loop - Actions".

  • Events
    • Time - Every 0.05 seconds of game time
  • Conditions
  • Actions
    • Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Terrain type at (Position of (Picked unit))) Equal to Barrens - Desert
          • Then - Actions
            • Unit - Move (Picked unit) instantly to (Center of Region 017 <gen>)
          • Else - Actions
            • Custom script: call DestroyGroup(GetLastCreatedGroup())
That should fix it. =D
 
Status
Not open for further replies.
Top