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

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.
 
Level 6
Joined
Aug 1, 2009
Messages
159
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])
 
Level 9
Joined
Oct 11, 2009
Messages
477
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.
 
Level 7
Joined
Jul 20, 2009
Messages
295
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:
Level 18
Joined
Jan 21, 2006
Messages
2,552
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.
Top