Something is wrong in my game. I have these boxes and use these rotate cubes to make the boxes red letters a-v rotate there own cube. all of them are working except when its up and down please help. HINT(you need two long lines to make a cube light up red)
REM *** START SYSTEM SETUP SECTION
autocam on
sync on
sync rate 30
color backdrop rgb(255,102,0)
REM *** STOP SYSTEM SETUP SECTION
REM *****************************************
load image "E:\Edutainment\images\arrow key.bmp",200
load image "E:\Edutainment\images\FP.bmp",100
level1=0
for t=100000 to 100005
make object cube t,0
next t
type ab
objID as integer
x# as float
y# as float
z# as float
endtype
dim Array1(86) as ab
dim Array2(1021) as ab
for i = 65 to 68
Array1(i).objID = i
Array1(i).x# = -210+(i-65)*(100)
Array1(i).y# = 100
Array1(i).z# = 300
Array2(i).objID = i+935
make object cube Array1(i).ObjID,10
position object Array1(i).ObjID, Array1(i).x#,Array1(i).y#,Array1(i).z#
make mesh from object 1,Array1(i).objID
add limb Array1(i).objID,1,1
scale limb Array1(i).objID,1,100,1000,0
show limb Array1(i).objID,1
offset limb Array1(i).objID,1,0,20,0
make object from limb Array2(i).objID,Array1(i).objID,1,1
position object Array2(i).objID,Array1(i).x#,Array1(i).y#,Array1(i).z#
remove limb Array1(i).objID,1
next i
for i = 69 to 73
Array1(i).objID = i
Array1(i).x# = -260+(i-69)*(100)
Array1(i).y# = 50
Array1(i).z# = 300
Array2(i).objID = i+935
make object cube Array1(i).ObjID, 10
position object Array1(i).ObjID, Array1(i).x#, Array1(i).y#,Array1(i).z#
make mesh from object 1,Array1(i).objID
add limb Array1(i).objID,1,1
scale limb Array1(i).objID,1,100,1000,0
show limb Array1(i).objID,1
offset limb Array1(i).objID,1,0,20,0
make object from limb Array2(i).objID,Array1(i).objID,1,1
position object Array2(i).objID,Array1(i).x#,Array1(i).y#,Array1(i).z#
remove limb Array1(i).objID,1
next i
for i = 74 to 77
Array1(i).objID = i
Array1(i).x# = -210+(i-74)*(100)
Array1(i).y# = 0
Array1(i).z# = 300
Array2(i).objID = i+935
make object cube Array1(i).ObjID, 10
position object Array1(i).ObjID, Array1(i).x#,Array1(i).y#,Array1(i).z#
make mesh from object 1,Array1(i).objID
add limb Array1(i).objID,1,1
scale limb Array1(i).objID,1,100,1000,0
show limb Array1(i).objID,1
offset limb Array1(i).objID,1,0,20,0
make object from limb Array2(i).objID,Array1(i).objID,1,1
position object Array2(i).objID,Array1(i).x#,Array1(i).y#,Array1(i).z#
remove limb Array1(i).objID,1
next i
for i = 78 to 82
Array1(i).objID = i
Array1(i).x# = -260+(i-78)*(100)
Array1(i).y# = -50
Array1(i).z# = 300
Array2(i).objID = i+935
make object cube Array1(i).ObjID, 10
position object Array1(i).ObjID, Array1(i).x#,Array1(i).y#,Array1(i).z#
make mesh from object 1,Array1(i).objID
add limb Array1(i).objID,1,1
scale limb Array1(i).objID,1,100,1000,0
show limb Array1(i).objID,1
offset limb Array1(i).objID,1,0,20,0
make object from limb Array2(i).objID,Array1(i).objID,1,1
position object Array2(i).objID,Array1(i).x#,Array1(i).y#,Array1(i).z#
remove limb Array1(i).objID,1
next i
for i = 83 to 86
Array1(i).objID = i
Array1(i).x# = -210+(i-83)*(100)
Array1(i).y# = -100
Array1(i).z# = 300
Array2(i).objID = i+935
make object cube Array1(i).ObjID, 10
position object Array1(i).ObjID, Array1(i).x#,Array1(i).y#,Array1(i).z#
make mesh from object 1,Array1(i).objID
add limb Array1(i).objID,1,1
scale limb Array1(i).objID,1,100,1000,0
show limb Array1(i).objID,1
offset limb Array1(i).objID,1,0,20,0
make object from limb Array2(i).objID,Array1(i).objID,1,1
position object Array2(i).objID,Array1(i).x#,Array1(i).y#,Array1(i).z#
remove limb Array1(i).objID,1
next i
rem first row
for t=2 to 6
make object cube t,20
position object t,-360+(t-1)*100,100,300
make mesh from object 1,t
add limb t,1,1
scale limb t,1,100,100,100
next t
rem second row
for t=7 to 10
make object cube t,20
position object t,-310+(t-6)*100,50,300
make mesh from object 1,t
add limb t,1,1
scale limb t,1,100,100,100
next t
rem third row
for t=11 to 15
make object cube t,20
position object t,-360+(t-10)*100,0,300
make mesh from object 1,t
add limb t,1,1
scale limb t,1,100,100,100
next t
rem fourth row
for t=16 to 19
make object cube t,20
position object t,-310+(t-15)*100,-50,300
make mesh from object 1,t
add limb t,1,1
scale limb t,1,100,100,100
next t
rem fifth row
for t=20 to 24
make object cube t,20
position object t,-360+(t-19)*100,-100,300
make mesh from object 1,t
add limb t,1,1
scale limb t,1,100,100,100
next t
makeWall(45,445,220,0,-60,0,311,100,0,0)
makeWall(46,615,220,5,162,0,0,100,0,90)
makeWall(47,445,615,5,-60,110,0,100,90,0)
makeWall(48,445,220,0,-60,0,-311,100,0,0)
makeWall(49,615,220,0,-280,0,0,100,0,90)
makeWall(50,445,615,5,-60,-110,0,100,90,0)
makeWall(51,1380,400,0,406,-110,-501,100,90,0)
makeWall(92,1380,400,0,406,110,-501,100,90,0)
makeWall(52,445,220,0,-60,0,-311,100,0,0)
makeWall(53,615,220,5,162,0,-311,100,0,0)
makeWall(54,445,615,5,-60,110,-1010,100,90,0)
makeWall(55,445,220,0,-60,0,-311-1010,100,0,0)
makeWall(56,615,220,5,-60,0,-311,100,0,0)
makeWall(57,445,615,5,-60,-110,-1010,100,90,0)
makeWall(58,445,220,0,-60+935,0,311-1010,100,0,0)
makeWall(59,615,220,5,162+935,0,-1008,100,0,90)
makeWall(60,415,220,5,-60,0,-311,100,0,0)
makeWall(61,445,220,0,-60+935,0,-308-1010,100,0,0)
makeWall(62,615,220,5,-280+935,0,-1010,100,0,90)
makeWall(63,445,615,5,-60+935,-110,-1010,100,90,0)
makeWall(64,445,220,5,-60+935,0,311,100,0,0)
makeWall(87,615,220,5,162+935,0,2,100,0,90)
makeWall(88,615,220,5,162+935,0,2,100,0,90)
makeWall(89,445,220,0,-60+935,0,-308,100,0,0)
makeWall(90,615,220,5,-280+935,0,0,100,0,90)
makeWall(91,445,615,5,-60+935,-110,0,100,90,0)
LVL1SECTION:
cls 0 : backdrop on
make object cube 1,30
position object 1,-60,-80,100
color object 1,rgb(0,255,0)
sync
do
P1X# = object position X(1)
P1Y# = object position Y(1)
P1Z# = object position Z(1)
A1X = object angle X(1)
A1Y = object angle Y(1)
A1Z = object angle Z(1)
cpX# = camera position X()
cpY# = camera position Y()
cpZ# = camera position Z()
caX# = camera angle X()
caY# = camera angle Y()
caZ# = camera angle Z()
cpZ# = Newzvalue(P1Z#,A1Y-180,200)
cpX# = Newxvalue(P1X#,A1Y-180,200)
Position camera cpX#,P1Y#+65,cpZ#
Point camera P1X#,P1Y#+35,P1Z#
if Upkey()=1 then move object 1,10
if downkey()=1 then move object 1,-10
if Leftkey()=1 then A1Y = wrapvalue(A1Y-5)
if Rightkey()=1 then A1Y = wrapvalue(A1Y+5)
If SHiftkey()=1 then move object up 1,10
If controlkey()=1 then move object up 1,-10
sync
REM ROTATING BOX/ARROW COLLISION EVENT
A1Z65 = object angle Z(65)
A1Z1000 = object angle Z(1000)
A1Z66 = object angle Z(66)
A1Z1001 = object angle Z(1001)
A1Z67 = object angle Z(67)
A1Z1002 = object angle Z(1002)
A1Z68 = object angle Z(68)
A1Z1003 = object angle Z(1003)
A1Z69 = object angle Z(69)
A1Z1004 = object angle Z(1004)
A1Z70 = object angle Z(70)
A1Z1005 = object angle Z(1005)
A1Z71 = object angle Z(71)
A1Z1006 = object angle Z(1006)
A1Z72 = object angle Z(72)
A1Z1007 = object angle Z(1007)
A1Z73 = object angle Z(73)
A1Z1008 = object angle Z(1008)
A1Z74 = object angle Z(74)
A1Z1009 = object angle Z(1009)
A1Z75 = object angle Z(75)
A1Z1010 = object angle Z(1010)
A1Z76 = object angle Z(76)
A1Z1011 = object angle Z(1011)
A1Z77 = object angle Z(77)
A1Z1012 = object angle Z(1012)
A1Z78 = object angle Z(78)
A1Z1013 = object angle Z(1013)
A1Z79 = object angle Z(79)
A1Z1014 = object angle Z(1014)
A1Z80 = object angle Z(80)
A1Z1015 = object angle Z(1015)
A1Z81 = object angle Z(81)
A1Z1016 = object angle Z(1016)
A1Z82 = object angle Z(82)
A1Z1017 = object angle Z(1017)
A1Z83 = object angle Z(83)
A1Z1018 = object angle Z(1018)
A1Z84 = object angle Z(84)
A1Z1019 = object angle Z(1019)
A1Z85 = object angle Z(85)
A1Z1020 = object angle Z(1020)
A1Z86 = object angle Z(86)
A1Z1021 = object angle Z(1021)
print "";P1X#;""
REM BOX/ARROW ROTATE EVENT
if inkey$()="a" OR inkey$()="A"
zrotate object 65,A1Z65+90
zrotate object 1000,A1Z1000+90
wait 100
ENDIF
if inkey$()="b" or inkey$()="B"
zrotate object 66,A1Z66+90
zrotate object 1001,A1Z1001+90
wait 100
ENDIF
if inkey$()="c" or inkey$()="C"
zrotate object 67,A1Z67+90
zrotate object 1002,A1Z1002+90
wait 100
endif
if inkey$()="d" or inkey$()="D"
zrotate object 68,A1Z68+90
zrotate object 1003,A1Z1003+90
wait 100
endif
if inkey$()="e" or inkey$()="E"
zrotate object 69,A1Z69+90
zrotate object 1004,A1Z1004+90
wait 100
endif
if inkey$()="f" or inkey$()="F"
zrotate object 70,A1Z70+90
zrotate object 1005,A1Z1005+90
wait 100
endif
if inkey$()="g" or inkey$()="G"
zrotate object 71,A1Z71+90
zrotate object 1006,A1Z1006+90
wait 100
endif
if inkey$()="h" or inkey$()="H"
zrotate object 72,A1Z72+90
zrotate object 1007,A1Z1007+90
wait 100
endif
if inkey$()="i" or inkey$()="I"
zrotate object 73,A1Z73+90
zrotate object 1008,A1Z1008+90
wait 100
endif
if inkey$()="j" or inkey$()="J"
zrotate object 74,A1Z74+90
zrotate object 1009,A1Z1009+90
wait 100
endif
if inkey$()="k" or inkey$()="K"
zrotate object 75,A1Z75+90
zrotate object 1010,A1Z1010+90
wait 100
endif
if inkey$()="l" or inkey$()="L"
zrotate object 76,A1Z76+90
zrotate object 1011,A1Z1011+90
wait 100
endif
if inkey$()="m" or inkey$()="M"
zrotate object 77,A1Z77+90
zrotate object 1012,A1Z1012+90
wait 100
endif
if inkey$()="n" OR inkey$()="N"
zrotate object 78,A1Z78+90
zrotate object 1013,A1Z1013+90
wait 100
ENDIF
if inkey$()="o" or inkey$()="O"
zrotate object 79,A1Z79+90
zrotate object 1014,A1Z1014+90
wait 100
ENDIF
if inkey$()="p" or inkey$()="P"
zrotate object 80,A1Z80+90
zrotate object 1015,A1Z1015+90
wait 100
endif
if inkey$()="q" or inkey$()="Q"
zrotate object 81,A1Z81+90
zrotate object 1016,A1Z1016+90
wait 100
endif
if inkey$()="r" or inkey$()="R"
zrotate object 82,A1Z82+90
zrotate object 1017,A1Z1017+90
wait 100
endif
if inkey$()="s" or inkey$()="S"
zrotate object 83,A1Z83+90
zrotate object 1018,A1Z1018+90
wait 100
endif
if inkey$()="t" or inkey$()="T"
zrotate object 84,A1Z84+90
zrotate object 1019,A1Z1019+90
wait 100
endif
if inkey$()="u" or inkey$()="U"
zrotate object 85,A1Z85+90
zrotate object 1020,A1Z1020+90
wait 100
endif
if inkey$()="v" or inkey$()="V"
zrotate object 86,A1Z86+90
zrotate object 1021,A1Z1021+90
wait 100
ENDIF
FOR t= 3 to 5
if object collision (1000+t-3,t) and object collision (1000+t-2,t) or object collision (1000+t-3,t) and object collision (1000+t+2,t) or object collision (1000+t-2,t) and object collision (1000+t+2,t)
color object t,rgb(255,0,0)
else
color object t,rgb(255,255,255)
endif
next t
` REM 7-14
rotatecoll(0,4,5,9,7)
rotatecoll(1,5,6,10,8)
rotatecoll(2,6,7,11,9)
rotatecoll(3,7,8,12,10)
rotatecoll(4,8,9,13,11)
rotatecoll(5,9,10,14,12)
rotatecoll(6,10,11,15,13)
rotatecoll(7,11,12,16,14)
rotatecoll3(8,12,17,15)
FOR t= 16 to 19
if object collision (1000+t-7,t) and object collision (1000+t-3,t) or object collision (1000+t-7,t) and object collision (1000+t-2,t) or object collision (1000+t-7,t) and object collision (1000+t+2,t)
color object t,rgb(255,0,0)
else
color object t,rgb(255,255,255)
endif
if object collision (1000+t-3,t) and object collision (1000+t-2,t) or object collision (1000+t-3,t) and object collision (1000+t+2,t) or object collision (1000+t-2,t) and object collision (1000+t+2,t)
color object t,rgb(255,0,0)
else
color object t,rgb(255,255,255)
endif
next t
REM ARROW COLLISION EVENTS
if object collision (1004,2) and object collision (1000,2)
color object 2,rgb(255,0,0)
else
color object 2,rgb(255,255,255)
endif
if object collision (1003,6) and object collision (1008,6)
color object 6,rgb(255,0,0)
else
color object 6,rgb(255,255,255)
endif
if object collision (1008,15) and object collision (1012,15) or object collision (1008,15) and object collision (1017,15) or object collision (1012,15) and object collision (1017,15)
color object 15,rgb(255,0,0)
else
color object 15,rgb(255,255,255)
if object exist(100004)
level1=level1+1
delete object 100004
endif
endif
if object collision (1013,20) and object collision (1018,20)
color object 20,rgb(255,0,0)
else
color object 20,rgb(255,255,255)
endif
if object collision (1014,21) and object collision (1018,21) or object collision (1014,21) and object collision (1019,21) or object collision (1018,21) and object collision (1019,21)
color object 21,rgb(255,0,0)
else
color object 21,rgb(255,255,255)
endif
if object collision (1015,22) and object collision (1019,22) or object collision (1015,22) and object collision (1020,22) or object collision (1019,22) and object collision (1020,22)
color object 22,rgb(255,0,0)
else
color object 22,rgb(255,255,255)
if object exist (100002)
level1=level1+1
delete object 100002
endif
endif
if object collision (1016,23) and object collision (1020,23) or object collision (1016,23) and object collision (1021,23) or object collision (1020,23) and object collision (1021,23)
color object 23,rgb(255,0,0)
else
color object 23,rgb(255,255,255)
if object exist (100001)
level1=level1+1
delete object 100001
endif
endif
if object collision (1017,24) and object collision (1021,24)
color object 24,rgb(255,0,0)
else
color object 24,rgb(255,255,255)
if object exist (100000)
level1=level1+1
delete object 100000
endif
endif
yrotate object 1,A1Y
loop
function makeWall(ID, xsize, ysize, zsize, xp, yp, zp, texture,xrotate,yrotate)
make object box ID, xsize, ysize, zsize
position object ID, xp, yp, zp
rotate object ID,xrotate,yrotate,0
texture object ID, texture
endfunction
function rotatecoll(IA,IB,IC,ID,t)
if object collision (IA+1000,t) and object collision(IB+1000,t) or object collision (IA+1000,t) and object collision(IC+1000,t) or object collision (IA+1000,t) and object collision(ID+1000,t)
color object t,rgb(255,0,0)
else
color object t,rgb(255,255,255)
endif
if object collision (IB+1000,t) and object collision(IC+1000,t) or object collision (IB+1000,t) and object collision(ID+1000,t) or object collision (IC+1000,t) and object collision(ID+1000,t)
color object t,rgb(255,0,0)
else
color object t,rgb(255,255,255)
endif
endfunction
function rotatecoll3(IA,IB,IC,t)
if object collision (IA+1000,t) and object collision(IB+1000,t) or object collision (IA+1000,t) and object collision(IC+1000,t) or object collision (IB+1000,t) and object collision(IC+1000,t)
color object t,rgb(255,0,0)
else
color object t,rgb(255,255,255)
endif
endfunction