• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Remove Location in Loop with Index

Status
Not open for further replies.
Level 4
Joined
Dec 24, 2005
Messages
54
Hi,

this is my problem:

  • For each (Integer ScreenMove2) from 1 to 9, do (Actions)
    • Schleifen - Aktionen
      • Einheit - Order ScreenMoveUnit to Patrouillieren nach ScreenMovePoint[ScreenMove2]
      • Custom script: call RemoveLocation (udg_ScreenMovePoint[.....])
ScreenMovePoint is a Location i have set for ScreenMovePoint[1]...[2] etc.
I now want to destroy this locations in my loop action. How does this work? What to set for "....."?

Thanks for you help!

Greetings
Kill3rbeast
 
  • For each (Integer ScreenMove2) from 1 to 9, do (Actions)
    • Loop - Actions
      • Unit - Order ScreenMoveUnit to Patrol to ScreenMovePoint[ScreenMove2]
      • Custom script: call RemoveLocation (udg_ScreenMovePoint[udg_ScreenMove2])
Shouldnt this work ?

JASS:
    set udg_ScreenMove2 = 1
    loop
        exitwhen udg_ScreenMove2 > 9
        call IssuePointOrderLoc( GetLastCreatedUnit(), "patrol", udg_ScreenMovePoint[udg_ScreenMove2] )
        call RemoveLocation (udg_ScreenMovePoint[udg_ScreenMove2])
        set udg_ScreenMove2 = udg_ScreenMove2 + 1
    endloop
 
Status
Not open for further replies.
Top