• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Solved] Positionining on a coordinate system how?

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,961
It's pretty simple if you store all of the regions in the same Array:
  • Set Variable Point = Center of RegionArray[4]
  • Unit - Move (Triggering unit) instantly to Point
  • Custom script: call RemoveLocation(udg_Point)
The Regions would be numbered from 1 to 64, going from left to right, top to bottom.


But if you really need to separate the Arrays into two categories:
  • Set Variable Point[0] = (Center of Column[4])
  • Set Variable X = (X of Point[0])
  • Set Variable Point[1] = (Center of Row[1])
  • Set Variable Y = (Y of Point[1])
  • Set Variable Point[2] = (Point(X, Y))
  • Unit - Move (Triggering unit) instantly to Point[2]
  • Custom script: call RemoveLocation(udg_Point[0])
  • Custom script: call RemoveLocation(udg_Point[1])
  • Custom script: call RemoveLocation(udg_Point[2])
 
Last edited:
Status
Not open for further replies.
Top