[Solved] 2D Board in Warcraft 3

Status
Not open for further replies.
Im trying to make a 2d board in warcraft 3 and i got an initial code below but somehow it doesnt behave the way i want it. i havent mod i dont know maybe a year or two now. pls help me. thanks.

  • Initialization
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set WIDTH = 14
      • Set HEIGHT = 13
      • Set _initialPoint = (Position of Summer Tree Wall 0000 <gen>)
      • For each (Integer _widthLooper) from 0 to (WIDTH - 1), do (Actions)
        • Loop - Actions
          • For each (Integer _heightLooper) from 0 to (HEIGHT - 1), do (Actions)
            • Loop - Actions
              • Unit - Create 1 Footman for Player 1 (Red) at (Point(((X of _initialPoint) + ((Real(_widthLooper)) x 512.00)), ((Y of _initialPoint) + ((Real(_heightLooper)) x 512.00)))) facing Default building facing degrees
ill also attach the test map
 

Attachments

Works fine, just you are placing the grid off the top of the map. The grid reference corner (lower left) is placed at the top left of the map.

North -> Positive Y
East -> Positive X
South -> Negative Y
West -> Negative X

The following kind of makes a grid of footmen
  • Initialization
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set WIDTH = 14
      • Set HEIGHT = 13
      • Set _initialPoint = (Position of Summer Tree Wall 0000 <gen>)
      • For each (Integer _widthLooper) from 0 to (WIDTH - 1), do (Actions)
        • Loop - Actions
          • For each (Integer _heightLooper) from 0 to (HEIGHT - 1), do (Actions)
            • Loop - Actions
              • Unit - Create 1 Footman for Player 1 (Red) at (Point(((X of _initialPoint) + ((Real(_widthLooper)) x 512.00)), ((Y of _initialPoint) + ((Real(_heightLooper)) x -512.00)))) facing Default building facing degrees
Changing the Y axis step from 512 to -512 makes the grid appear fully on the map.

Alternatively you could move the reference point to the lower left of the map.
 
Status
Not open for further replies.
Back
Top