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

[JASS] Rect creation in loop

Status
Not open for further replies.
Level 3
Joined
Oct 31, 2007
Messages
30
For simplicity's sake I've tried to make a loop to create the rects I need for my map. Below is my attempt which doesn't work:

JASS:
    set loop_index = 0
    loop
        exitwhen loop_index > 99
        set mod_y = I2R(ModuloInteger(loop_index, 10))
        set mod_x = (I2R(loop_index) - mod_y) / 10.0
        set base_y = (mod_y * 3584.0) - 7680.0
        set base_x = (mod_x * 3584.0) - 28160.0
        call SetRect(udg_gam_planets_area[loop_index], base_x, base_y, base_x+3584.0, base_y+3584.0)
        set loop_index = loop_index + 1
    endloop

To test the script I made a chat command that adds visibility modifiers and none show up anywhere (which they do, when the command is used on another gui-created "region" array).

Am I misunderstanding the use of SetRect() or am I confusing rects and regions?

Thank you for your help in advance.
 
Status
Not open for further replies.
Top