Hello all,
I faced my winner in logic thinking (or maybe i'm just tired), but for some reason i can't solve a stupid mistace i'v made in my "cube from cubes" -project.
So, i'm trying to build a box from cubes X*Y*Z and change the row values with if statement and the problem presist like this;
XX
XXX
XXX
X
when it should be like;
XXX
XXX
XXX
oh hell, look for your self and help the stupid out
Rem Project: cubet
Rem Created: Friday, December 14, 2012
Rem ***** Main Source File *****
sync on: sync rate 60
h = 0 //height
w = 0 //width
d = 0 //debth
mh = 10 //max height
mw = 10 //max width
md = 10 //max debth
max = mh*mw*md
i = 0
x = 0
while i < max
if x > mw*h
w = 0
inc h,1
endif
if x = mw*mh and d =< md
x=0
h=0
w=0
inc d,1
endif
inc i,1
inc w,1
inc x,1
make object cube i,10
position object i, w*11,h*11,d*11
endwhile
position camera 0, mh/2*11,0
do
control camera using arrowkeys 0,1,1
set cursor 10,10
print "debug monitor"
set cursor 10,30
print "X-axis: ", camera position x()
set cursor 10,40
print "Z-axis: ", camera position z()
sync
loop