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

  • board experiment.w3x
    17.2 KB · Views: 26

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
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.
Top