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

Wisp Wheel Problem...

Status
Not open for further replies.
Go to your trigger, in the Trigger Editor and Right click on the name of the trigger (but in the right window of the interface, not the left one, with the list of the triggers), and click "Copy as Text". Come back here to your new thread, type "[ tr igger]", without the spaces and the quotes, right-click -> paste and in the end of the text type "[/ tr igger]" (again without the spaces and the quotes).
 
Level 3
Joined
Mar 16, 2010
Messages
24
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Center[2] = (Position of Mage 0075 <gen>)
  • CreateBoulder 2
    • Events
      • Time - Elapsed game time is 0.03 seconds
    • Conditions
    • Actions
      • -------- Change A to controll the amount of boulders in 1 circle --------
      • -------- Change B to controll the amount circles --------
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • For each (Integer B) from 1 to 2, do (Actions)
            • Loop - Actions
              • Set UnitArray = (UnitArray + 1)
              • Set tmp_point[2] = (Center[2] offset by ((Real((Integer B))) x 200.00) towards ((Real((Integer A))) x 90.00) degrees)
              • Set UnitAngle[UnitArray] = ((Real((Integer A))) x 90.00)
              • Set UnitDistance[UnitArray] = ((Real((Integer B))) x 200.00)
              • Unit - Create 1 Energy Ball for Player 9 (Gray) at tmp_point[2] facing Default building facing degrees
              • Unit - Set the custom value of (Last created unit) to UnitArray
              • Unit Group - Add (Last created unit) to UnitGroup[2]
              • Custom script: call RemoveLocation(udg_tmp_point[2])

  • Move 2
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • -------- raise the + amount in real=real+1.00 to increase speed --------
      • Set Real[2] = (Real[2] - 1.00)
      • Unit Group - Pick every unit in UnitGroup[2] and do (Actions)
        • Loop - Actions
          • Set tmp_point[2] = (Center[2] offset by UnitDistance[(Custom value of (Picked unit))] towards (Real[2] + UnitAngle[(Custom value of (Picked unit))]) degrees)
          • Unit - Move (Picked unit) instantly to tmp_point[2], facing (Real[2] + UnitAngle[(Custom value of (Picked unit))]) degrees
          • Custom script: call RemoveLocation(udg_tmp_point[2])


so the problem is, the units will not move in a circle around the center. The units are created at the correct places, but then they do not move.
 
Level 9
Joined
May 27, 2006
Messages
498
The same problem as in previous thread...
All unit group arrays other than [1] have to be created before using them. Just put this at the beggining of your CreateBoulder trigger:
  • Set UnitGroup[2] = (Units in (Playable map area))
  • Unit Group - Remove all units from UnitGroup[2]
Also, use Map Initialization instead of estimated timer. It's plain better, and the trigger will still work as intended. (in this case)
 
Status
Not open for further replies.
Top