• 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.

[General] RemoveLocation

Status
Not open for further replies.
Level 28
Joined
Jan 26, 2007
Messages
4,789
Indexes (arrays) work the same way in JASS (custom scripts) as in regular GUI: you wrap square brackets around them.
"Player number" in JASS is GetPlayerId( player ), the difference is that in JASS Player(0) is red (Player 1 in GUI). So you have to add 1 to that number.
"Owner of unit" is GetOwningPlayer( unit )
"Killing Unit" is GetKillingUnit()

The finished result becomes: call RemoveLocation( udg_variableName[ GetPlayerId( GetOwningPlayer( GetKillingUnit() ) ) + 1 ] )
That is with spacing so it - hopefully - becomes a bit more clear.

Note that if there is no wait in your trigger (between setting the location and removing the location), you don't need an array for this at all.
 
Last edited:
Status
Not open for further replies.
Top