sync on
sync rate 240
for x = 1 to 12
load object "arrow.x",x
next x
for t = 13 to 39
//make object cube t,1
load object "cube.x",t
next t
position object 1,-2,-1,-1.5
position object 2,-2,0,-1.5
position object 3,-2,1,-1.5
scale object 10,200,200,100 : position object 10,-3.5,0,-1.5
position object 4,-2,1.5,-1 : rotate object 4,90,180,180
position object 5,-2,1.5,0 : rotate object 5,90,180,180
position object 6,-2,1.5,1 : rotate object 6,90,180,180
scale object 11,200,200,100 : position object 11,-3.5,1.5,0 : rotate object 11,90,180,180
position object 7,-1,-1.5,-2 : rotate object 7,-90,-90,0
position object 8,0,-1.5,-2 : rotate object 8,-90,-90,0
position object 9,1,-1.5,-2 : rotate object 9,-90,-90,0
scale object 12,200,200,100 : position object 12,0,-1.5,-3.5 : rotate object 12,-90,-90,0
for f=1 to 12 : fix object pivot f : next f
position object 13,-1,-1,-1 : position object 14,0,-1,-1 : position object 15,1,-1,-1
position object 16,-1,0,-1 : position object 17,0,0,-1 : position object 18,1,0,-1
position object 19,-1,1,-1 : position object 20,0,1,-1 : position object 21,1,1,-1
//
position object 22,-1,-1,0 : position object 23,0,-1,0 : position object 24,1,-1,0
position object 25,-1,0,0 : position object 26,0,0,0 : position object 27,1,0,0
position object 28,-1,1,0 : position object 29,0,1,0 : position object 30,1,1,0
//
position object 31,-1,-1,1 : position object 32,0,-1,1 : position object 33,1,-1,1
position object 34,-1,0,1 : position object 35,0,0,1 : position object 36,1,0,1
position object 37,-1,1,1 : position object 38,0,1,1 : position object 39,1,1,1
do
sync
position camera 3,5,-5
point camera 0,0,0
for block = 13 to 39
if object position y(block)= 1
if object position x(block) = -1
if object position z(block) = -1 then a = block
if object position z(block) = 0 then b = block
if object position z(block) = 1 then c = block
endif
if object position x(block) = 0
if object position z(block) = -1 then d = block
if object position z(block) = 0 then e = block
if object position z(block) = 1 then f = block
endif
if object position x(block) = 1
if object position z(block) = -1 then g = block
if object position z(block) = 0 then h = block
if object position z(block) = 1 then i = block
endif
endif
if object position y(block)= 0
if object position x(block) = -1
if object position z(block) = -1 then j = block
if object position z(block) = 0 then k = block
if object position z(block) = 1 then l = block
endif
if object position x(block) = 0
if object position z(block) = -1 then m = block
if object position z(block) = 0 then n = block
if object position z(block) = 1 then o = block
endif
if object position x(block) = 1
if object position z(block) = -1 then p = block
if object position z(block) = 0 then q = block
if object position z(block) = 1 then r = block
endif
endif
if object position y(block)= -1
if object position x(block) = -1
if object position z(block) = -1 then s = block
if object position z(block) = 0 then t = block
if object position z(block) = 1 then u = block
endif
if object position x(block) = 0
if object position z(block) = -1 then v = block
if object position z(block) = 0 then w = block
if object position z(block) = 1 then x = block
endif
if object position x(block) = 1
if object position z(block) = -1 then y = block
if object position z(block) = 0 then z = block
if object position z(block) = 1 then zz = block
endif
endif
next block
pi = pick object(mousex(),mousey(),1,12)
set cursor 0,0 : print pi
if mouseclick()=2
if pi=1 OR pi=2 OR pi=3 OR pi=10
rotate object pi,0,wrapvalue(object angle y(pi)+180),0
wait 250
endif
if pi=4 OR pi=5 OR pi=6 OR pi=11
rotate object pi,0,0,wrapvalue(object angle z(pi)+180)
wait 250
endif
if pi=7 OR pi=8 OR pi=9 OR pi=12
rotate object pi,0,wrapvalue(object angle y(pi)+180),0
wait 250
endif
endif
if mouseclick()=1
if pi=1
//turn the bottom clockwise
if object angle y(pi)=180
ctr = 0
repeat
sync
yrotate object w,wrapvalue(object angle y(w)+1)
position object s,cos(object angle y(w)+225)*sqrt(2),-1,-sin(object angle y(w)+225)*sqrt(2)
yrotate object s,wrapvalue(object angle y(s)+1)
position object t,cos(object angle y(w)+180),-1,-sin(object angle y(w)+180)
yrotate object t,wrapvalue(object angle y(t)+1)
position object u,cos(object angle y(w)+135)*sqrt(2),-1,-sin(object angle y(w)+135)*sqrt(2)
yrotate object u,wrapvalue(object angle y(u)+1)
position object v,cos(object angle y(w)+270),-1,-sin(object angle y(w)+270)
yrotate object v,wrapvalue(object angle y(v)+1)
position object x,cos(object angle y(w)+90),-1,-sin(object angle y(w)+90)
yrotate object x,wrapvalue(object angle y(x)+1)
position object y,cos(object angle y(w)+315)*sqrt(2),-1,-sin(object angle y(w)+315)*sqrt(2)
yrotate object y,wrapvalue(object angle y(y)+1)
position object z,cos(object angle y(w)),-1,-sin(object angle y(w))
yrotate object z,wrapvalue(object angle y(z)+1)
position object zz,cos(object angle y(w)+45)*sqrt(2),-1,-sin(object angle y(w)+45)*sqrt(2)
yrotate object zz,wrapvalue(object angle y(zz)+1)
inc ctr
until ctr=90
endif
//turn the bottom counter clockwise
if object angle y(pi)=0
ctr = 0
repeat
sync
yrotate object w,wrapvalue(object angle y(w)-1)
position object s,cos(object angle y(w)+225)*sqrt(2),-1,-sin(object angle y(w)+225)*sqrt(2)
yrotate object s,wrapvalue(object angle y(s)-1)
position object t,cos(object angle y(w)+180),-1,-sin(object angle y(w)+180)
yrotate object t,wrapvalue(object angle y(t)-1)
position object u,cos(object angle y(w)+135)*sqrt(2),-1,-sin(object angle y(w)+135)*sqrt(2)
yrotate object u,wrapvalue(object angle y(u)-1)
position object v,cos(object angle y(w)+270),-1,-sin(object angle y(w)+270)
yrotate object v,wrapvalue(object angle y(v)-1)
position object x,cos(object angle y(w)+90),-1,-sin(object angle y(w)+90)
yrotate object x,wrapvalue(object angle y(x)-1)
position object y,cos(object angle y(w)+315)*sqrt(2),-1,-sin(object angle y(w)+315)*sqrt(2)
yrotate object y,wrapvalue(object angle y(y)-1)
position object z,cos(object angle y(w)),-1,-sin(object angle y(w))
yrotate object z,wrapvalue(object angle y(z)-1)
position object zz,cos(object angle y(w)+45)*sqrt(2),-1,-sin(object angle y(w)+45)*sqrt(2)
yrotate object zz,wrapvalue(object angle y(zz)-1)
inc ctr
until ctr=90
endif
endif
if pi=2
//turn the center clockwise (y axis)
if object angle y(pi)=180
ctr = 0
repeat
sync
yrotate object n,wrapvalue(object angle y(n)+1)
position object j,cos(object angle y(n)+225)*sqrt(2),0,-sin(object angle y(n)+225)*sqrt(2)
yrotate object j,wrapvalue(object angle y(j)+1)
position object k,cos(object angle y(n)+180),0,-sin(object angle y(n)+180)
yrotate object k,wrapvalue(object angle y(k)+1)
position object l,cos(object angle y(n)+135)*sqrt(2),0,-sin(object angle y(n)+135)*sqrt(2)
yrotate object l,wrapvalue(object angle y(l)+1)
position object m,cos(object angle y(n)+270),0,-sin(object angle y(n)+270)
yrotate object m,wrapvalue(object angle y(m)+1)
position object o,cos(object angle y(n)+90),0,-sin(object angle y(n)+90)
yrotate object o,wrapvalue(object angle y(o)+1)
position object p,cos(object angle y(n)+315)*sqrt(2),0,-sin(object angle y(n)+315)*sqrt(2)
yrotate object p,wrapvalue(object angle y(p)+1)
position object q,cos(object angle y(n)),0,-sin(object angle y(n))
yrotate object q,wrapvalue(object angle y(q)+1)
position object r,cos(object angle y(n)+45)*sqrt(2),0,-sin(object angle y(n)+45)*sqrt(2)
yrotate object r,wrapvalue(object angle y(r)+1)
inc ctr
until ctr=90
endif
//turn the center counter clockwise (y axis)
if object angle y(pi)=0
ctr = 0
repeat
sync
yrotate object n,wrapvalue(object angle y(n)-1)
position object j,cos(object angle y(n)+225)*sqrt(2),0,-sin(object angle y(n)+225)*sqrt(2)
yrotate object j,wrapvalue(object angle y(j)-1)
position object k,cos(object angle y(n)+180),0,-sin(object angle y(n)+180)
yrotate object k,wrapvalue(object angle y(k)-1)
position object l,cos(object angle y(n)+135)*sqrt(2),0,-sin(object angle y(n)+135)*sqrt(2)
yrotate object l,wrapvalue(object angle y(l)-1)
position object m,cos(object angle y(n)+270),0,-sin(object angle y(n)+270)
yrotate object m,wrapvalue(object angle y(m)-1)
position object o,cos(object angle y(n)+90),0,-sin(object angle y(n)+90)
yrotate object o,wrapvalue(object angle y(o)-1)
position object p,cos(object angle y(n)+315)*sqrt(2),0,-sin(object angle y(n)+315)*sqrt(2)
yrotate object p,wrapvalue(object angle y(p)-1)
position object q,cos(object angle y(n)),0,-sin(object angle y(n))
yrotate object q,wrapvalue(object angle y(q)-1)
position object r,cos(object angle y(n)+45)*sqrt(2),0,-sin(object angle y(n)+45)*sqrt(2)
yrotate object r,wrapvalue(object angle y(r)-1)
inc ctr
until ctr=90
endif
endif
if pi=3
//turn the top clockwise
if object angle y(pi)=180
ctr = 0
repeat
sync
yrotate object e,wrapvalue(object angle y(e)+1)
position object a,cos(object angle y(e)+225)*sqrt(2),1,-sin(object angle y(e)+225)*sqrt(2)
yrotate object a,wrapvalue(object angle y(a)+1)
position object b,cos(object angle y(e)+180),1,-sin(object angle y(e)+180)
yrotate object b,wrapvalue(object angle y(b)+1)
position object c,cos(object angle y(e)+135)*sqrt(2),1,-sin(object angle y(e)+135)*sqrt(2)
yrotate object c,wrapvalue(object angle y(c)+1)
position object d,cos(object angle y(e)+270),1,-sin(object angle y(e)+270)
yrotate object d,wrapvalue(object angle y(d)+1)
position object f,cos(object angle y(e)+90),1,-sin(object angle y(e)+90)
yrotate object f,wrapvalue(object angle y(f)+1)
position object g,cos(object angle y(e)+315)*sqrt(2),1,-sin(object angle y(e)+315)*sqrt(2)
yrotate object g,wrapvalue(object angle y(g)+1)
position object h,cos(object angle y(e)),1,-sin(object angle y(e))
yrotate object h,wrapvalue(object angle y(h)+1)
position object i,cos(object angle y(e)+45)*sqrt(2),1,-sin(object angle y(e)+45)*sqrt(2)
yrotate object i,wrapvalue(object angle y(i)+1)
inc ctr
until ctr=90
endif
//turn the top counter clockwise
if object angle y(pi)=0
ctr = 0
repeat
sync
yrotate object e,wrapvalue(object angle y(e)-1)
position object a,cos(object angle y(e)+225)*sqrt(2),1,-sin(object angle y(e)+225)*sqrt(2)
yrotate object a,wrapvalue(object angle y(a)-1)
position object b,cos(object angle y(e)+180),1,-sin(object angle y(e)+180)
yrotate object b,wrapvalue(object angle y(b)-1)
position object c,cos(object angle y(e)+135)*sqrt(2),1,-sin(object angle y(e)+135)*sqrt(2)
yrotate object c,wrapvalue(object angle y(c)-1)
position object d,cos(object angle y(e)+270),1,-sin(object angle y(e)+270)
yrotate object d,wrapvalue(object angle y(d)-1)
position object f,cos(object angle y(e)+90),1,-sin(object angle y(e)+90)
yrotate object f,wrapvalue(object angle y(f)-1)
position object g,cos(object angle y(e)+315)*sqrt(2),1,-sin(object angle y(e)+315)*sqrt(2)
yrotate object g,wrapvalue(object angle y(g)-1)
position object h,cos(object angle y(e)),1,-sin(object angle y(e))
yrotate object h,wrapvalue(object angle y(h)-1)
position object i,cos(object angle y(e)+45)*sqrt(2),1,-sin(object angle y(e)+45)*sqrt(2)
yrotate object i,wrapvalue(object angle y(i)-1)
inc ctr
until ctr=90
endif
endif
if pi=4
//turn the front clockwise
if object angle z(pi)=0
ctr = 0
repeat
sync
zrotate object m,wrapvalue(object angle z(m)-1)
position object s,-cos(object angle z(m)+225)*sqrt(2),-sin(object angle z(m)+225)*sqrt(2),-1
zrotate object s,wrapvalue(object angle z(s)-1)
position object j,-cos(object angle z(m)+180),-sin(object angle z(m)+180),-1
zrotate object j,wrapvalue(object angle z(j)-1)
position object a,-cos(object angle z(m)+135)*sqrt(2),-sin(object angle z(m)+135)*sqrt(2),-1
zrotate object a,wrapvalue(object angle z(a)-1)
position object v,-cos(object angle z(m)+270),-sin(object angle z(m)+270),-1
zrotate object v,wrapvalue(object angle z(v)-1)
position object d,-cos(object angle z(m)+90),-sin(object angle z(m)+90),-1
zrotate object d,wrapvalue(object angle z(d)-1)
position object y,-cos(object angle z(m)+315)*sqrt(2),-sin(object angle z(m)+315)*sqrt(2),-1
zrotate object y,wrapvalue(object angle z(y)-1)
position object p,-cos(object angle z(m)),-sin(object angle z(m)),-1
zrotate object p,wrapvalue(object angle z(p)-1)
position object g,-cos(object angle z(m)+45)*sqrt(2),-sin(object angle z(m)+45)*sqrt(2),-1
zrotate object g,wrapvalue(object angle z(g)-1)
inc ctr
until ctr=90
endif
//turn the front counter clockwise
if object angle z(pi)=180
ctr = 0
repeat
sync
zrotate object m,wrapvalue(object angle z(m)+1)
position object s,-cos(object angle z(m)+225)*sqrt(2),-sin(object angle z(m)+225)*sqrt(2),-1
zrotate object s,wrapvalue(object angle z(s)+1)
position object j,-cos(object angle z(m)+180),-sin(object angle z(m)+180),-1
zrotate object j,wrapvalue(object angle z(j)+1)
position object a,-cos(object angle z(m)+135)*sqrt(2),-sin(object angle z(m)+135)*sqrt(2),-1
zrotate object a,wrapvalue(object angle z(a)+1)
position object v,-cos(object angle z(m)+270),-sin(object angle z(m)+270),-1
zrotate object v,wrapvalue(object angle z(v)+1)
position object d,-cos(object angle z(m)+90),-sin(object angle z(m)+90),-1
zrotate object d,wrapvalue(object angle z(d)+1)
position object y,-cos(object angle z(m)+315)*sqrt(2),-sin(object angle z(m)+315)*sqrt(2),-1
zrotate object y,wrapvalue(object angle z(y)+1)
position object p,-cos(object angle z(m)),-sin(object angle z(m)),-1
zrotate object p,wrapvalue(object angle z(p)+1)
position object g,-cos(object angle z(m)+45)*sqrt(2),-sin(object angle z(m)+45)*sqrt(2),-1
zrotate object g,wrapvalue(object angle z(g)+1)
inc ctr
until ctr=90
endif
endif
endif
loop
Run that, and remove the comment slashes before make cube in the for next loop, replacing the slashes on the "load object 'cube.x'" command so yours doesn't get off track trying to find an object that isn't there.
The only four modules that 'work' right now are the three arrows on the left, and the one on the top closest to you. Right click an arrow to change its direction, then click it to rotate the row/column in that direction.
Right now its screwy, and I've been wracking my brain trying to fix it. Does anyone have a suggestion?
Ich liebe Hundepfeifen; du hast wohl keine gehört.