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

Attack Trigger Randomly Quit?

Status
Not open for further replies.
Level 6
Joined
Sep 11, 2006
Messages
172
Why is this not working anymore?

  • Spawn
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to Playing, do (Actions)
        • Loop - Actions
          • Set DSpawnPoint[1] = (Random point in DarkSpawn[(Random integer number between 1 and 32)])
          • Set GroupDump[7] = (Units within 600.00 of DSpawnPoint[1] matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Matching unit)) is in Users) Equal to True)))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in GroupDump[7]) Equal to 0
            • Then - Actions
              • Custom script: call DestroyGroup (udg_GroupDump[7])
              • Unit - Create 1 |cff434e54Rupture|r for Player 11 (Dark Green) at DSpawnPoint[1] facing Default building facing degrees
              • Custom script: call RemoveLocation(udg_DSpawnPoint[1])
              • Set AttackPoint[1] = (Position of PrimaryTargets[(Random integer number between 1 and 6)])
              • Set TestPing = AttackPoint[1]
              • Unit - Set Rally-Point for (Last created unit) to AttackPoint[1]
              • Custom script: call RemoveLocation(udg_AttackPoint[1])
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fWraith Fiend|r
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fWraith Fiend|r
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fWraith Fiend|r
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fWraith Fiend|r
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fWraith Fiend|r
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fDespoiler|r (End Line)
            • Else - Actions
              • Custom script: call DestroyGroup (udg_GroupDump[7])
              • Custom script: call RemoveLocation(udg_DSpawnPoint[1])
              • Custom script: call RemoveLocation(udg_AttackPoint[1])
              • Trigger - Run (This trigger) (ignoring conditions)
I don't think I've changed anything with this trigger which has been working the last 10 or so times i tested the map. The problem is that AttackPoint[1] just does not appear at all. The primary targets are established at map initialization and so picking up their points for a simple rally point should not be a problem.

Is my map just broken now?

I guess I should add that the units do spawn, but instead of moving to AttackPoint[1] they just run to the position of their team's hero. AttackPoint[1] never gets set. I've tested this with a map ping, which only pings the center of the map. Something must have broke with this variable.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Is there a way to easily export trigger and object data without having to constantly open and close maps?

Open both maps and then switch between them through the Window menu.

You can also export all trigger/object data in trigger/object editor by selecting export trigger/object data. Importing them will replace all trigger/object data in the map.
 
He doesn't need to check, the problem with his code is obvious.

You are creating an infinite loop when stepping once into the ELSE stub.

If you reach ELSE, the trigger will be fired again and again without any delay. Also, you are trying to remove a location that has not been created in the ELSE stub, causing the trigger to stop working.
Simply remove the two last actions in the ELSE stub and it should work just fine.
 
Status
Not open for further replies.
Top