Making a cube around a location. [Help]

Discussion in 'Plugin Development' started by coldguy101, May 16, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    coldguy101

    Hello, I am having some trouble getting through the thought pattern of doing this... I know it requires three loops, one for x, one for y, and one for z; however, I struggle with what exactly I would put within the loop parameters... Any help is greatly appreciated! Thanks!
     
  2. Offline

    Komak57

    theres 2 ways you can do this. 1) single point, define length width, height, create loops and build. or 2) start point, end point, create loops and build.

    pseudo (means translate from english)
    width = x2 - x1
    length = z2 - z1
    height = y2 - y1
    for Y start through height
    for Z start through length
    for X start through width
    replaceblock(world, x, y, z)
    end
    end
    end
    ---
    if you do dual coordinates, you have to translate the coordinates to LowXYZ and HighXYZ containing the lowest X coord vs highest. If you do by length-width-height, you can just subtract the center point by the said vars etc.
     
  3. Offline

    coldguy101

    Komak57 Thanks :) I think I got it :D
     
Thread Status:
Not open for further replies.

Share This Page