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

[Solved] Positionining on a coordinate system how?

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,899
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