• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Location Leak

Status
Not open for further replies.
Level 7
Joined
Jul 20, 2009
Messages
295
I was wondering on how to remove a location variable that is arrayed?

+Rep, thank you.

Edit - the other Thread is a mistake, the Hive's Server lagged and I somehow have double threaded, mod please delete the other thread, not this.
 
JASS:
call RemoveLocation(udg_variablename[arraynumber])

Usage:

JASS:
call RemoveLocation(udg_TempPoint[0])

If your using an integer variable for the array:

JASS:
call RemoveLocation(udg_variablename[udg_variablename])

Usage:

JASS:
call RemoveLocation(udg_TempPoint[udg_TP])
 
There is a Player Number function in the integer section. Just try to find the function "Player Number of (Triggering player)" in the integer section in the variable index.
 
You misunderstood me. >.<

This is what I meant,
  • Custom script: call RemoveLocation(udg_HeroPosition[PlayerNumberOfTriggeringPlayer])
How to do it?

Not this. :S
  • Set HeroPosition[(Player number of (Triggering player))] = (Center of (Playable map area))
 
Last edited:
Keep in mind that when you set array members using the player ID in GUI it will actually start at "1", rather than "0". This may offset your calculations, so perhaps you'll want to do:

  • Custom script: call RemoveLocation(udg_HeroPosition[GetPlayerId(GetTriggerPlayer())+1])
This will align with the actions you perform in GUI, because I'm assuming that is how you are assigning the "udg_HeroPosition" array elements.
 
Status
Not open for further replies.
Back
Top