bignono
Nombre de messages : 1127 Age : 67 Localisation : Val de Marne Date d'inscription : 13/11/2011
| Sujet: Re: erreur panoramic ou windows? Lun 20 Mai 2013 - 19:42 | |
| Jack, j'ai réussi à reproduire le même bug une fois de plus! si les lignes 49 et 50 sont en rem le programme se déroule bien. Mais dès que j'enlève l'apostrophe à ces 2 lignes (if lap=1 then... et if o3d_object_exists(209)=1 then ...) alors là, je déclenche le bug. - Code:
-
dim rep$,tmp$,son$,joue$,vd,rot,a,rad,t,lap,m,tps%,mn%,s%,cs%,obj,i,c,tt,q rep$="c:\mesprog\buggy\":rad=acos(-1)/180 label bouge_train,tour,temps,boum,fin graph1():choix():graph2():sound 5:file_load 5,rep$+"ralentibgy.wav":play 5:joue$="ralentibgy.wav" start():son$="start.wav" timer 09:timer_interval 09,1:on_timer 09,temps timer 10:timer_interval 10,1:on_timer 10,tour timer 11:timer_interval 11,1:on_timer 11,bouge_train end
temps: tmp$="TIME: ":tps%=tps%+1:mn%=int(tps%/3600):s%=int(tps%/60)-(mn%*60) cs%=tps%-((mn%*3600)+(s%*60)) if len(str$(mn%))=2:tmp$=tmp$+str$(mn%)+" : ":else:tmp$=tmp$+"0"+str$(mn%)+" : ":end_if if len(str$(s%))=2:tmp$=tmp$+str$(s%)+" : ":else:tmp$=tmp$+"0"+str$(s%)+" : ":end_if if len(str$(cs%))=2:tmp$=tmp$+str$(cs%):else:tmp$=tmp$+"0"+str$(cs%):end_if 3d_text_change 203,tmp$ if s%=5 then 3d_text_change 290,"FINISH":3d_x_position 290,6.25 return
bouge_train: timer_off 11 if o3d_x_position(79)<-750 then 3d_x_position 79,1512:3d_x_position 82,1600:3d_x_position 85,1697.25:3d_x_position 88,1794.5 for obj=79 to 88 step 3:3d_x_position obj,o3d_x_position(obj)-0.75:next obj timer_on 11 return
tour: timer_off 10 if scancode>0 select key_down_code case 27:gosub fin case 37:if vd>0.05 then rot=rot+2:3d_y_rotate 33,rot:son$="decc.wav":' flèche gauche case 38:vd=vd+.1:if vd<1.75:son$="start.wav":else:son$="run.wav":end_if:' flèche haute case 39:if vd>0.05 then rot=rot-2:3d_y_rotate 33,rot:son$="decc.wav":' flèche droite case 40:vd=vd-.1:son$="decc.wav":if vd<0.05 then son$="ralentibgy.wav":' flèche basse end_select else son$="decc.wav":if vd< 0.05 then son$="ralentibgy.wav" end_if 3d_move 33,vd:3d_x_rotate 34,t:t=t-acos(-1)*(vd*10) a=rot*rad:cam_x_position o3d_x_position(33)-10*sin(a):cam_z_position o3d_z_position(33)-10*cos(a) point_x_position o3d_x_position(33):point_z_position o3d_z_position(33) vd=vd-(vd/40):if vd<0 then vd=0 for i=15 to 25:c=c+o3d_collision(34,i):next i:if c>0 then vd=vd-(vd/5):c=0:' collision avec l'herbe
' =========================================================================================================================================== ' =========================================================================================================================================== ' if lap=1 then 3d_text 209,tmp$:3d_scale 209,4,4,4:lap=0 ' if o3d_object_exists(209)=1 then 3d_x_rotate 209,t:3d_position 209,o3d_x_position(33),o3d_y_position(33)+2.75,o3d_z_position(33) if o3d_z_position(33)<-60 then 3d_y_position 31,5:3d_y_position 32,5 if o3d_collision(34,31)=1 or o3d_collision(34,32)=1 then 3d_y_position 31,20:3d_y_position 32,20:lap=lap+1 ' =========================================================================================================================================== ' ===========================================================================================================================================
3d_text_change 202,"SPEED: "+str$(int((vd*100)/2))+" Km/h" caption 0,str$(int((vd*100)/2))+" Km/h - position x="+str$(o3d_x_position(33))+" - position z="+str$(o3d_z_position(33))+" - LAP="+str$(lap)+" - VD="+str$(vd) if son$<>joue$ then delete 5:sound 5:file_load 5,rep$+son$ play 5:joue$=son$ if (abs(o3d_z_position(33)-1200)<350 and abs(o3d_x_position(33)-o3d_x_position(79))<500) then play 6 pause 100 timer_on 10 for i=79 to 88 step 3:tt=tt+o3d_collision(34,i)+o3d_collision(33,i):next i:if tt>1 then gosub boum return
boum: timer_off 10:timer_off 9:tt=0:delete 5 3d_chain_break 34,33:3d_scale 34,3,3,3:3d_y_position 34,1.275 c=rnd(2)-1:sound 5:file_load 5,rep$+"accd.wav":play 5 for i=0 to 450 step 10 if i<80 then 3d_y_position 33,o3d_y_position(33)+1 if i>90 and i<150 then 3d_y_position 33,o3d_y_position(33)-1.6 3d_y_rotate 33,i*-1:3d_y_rotate 34,i*c 3d_position 33,o3d_x_position(33)+c*rnd(1),o3d_y_position(33),o3d_z_position(33)-rnd(0.5) 3d_position 34,o3d_x_position(34)+c*rnd(1),o3d_y_position(34),o3d_z_position(34)+c*rnd(1) pause 50 next i delete 5:delete 6:3d_delete 33:3d_delete 34:timer_off 11 if message_confirmation_yes_no("Recommencer?")=1 hide 3:hide 1 3d_text_change 202,"SPEED: 000 km/h":vd=0 3d_text_change 203,"TIME: 00 : 00 : 00":tps%=0:mn%=0:s%=0:cs%=0 choix() ' le BUGGY 3d_mesh 33:3d_load_object 33,rep$+"bgy"+str$(q)+".3ds":3d_load_texture 33,rep$+"bgy"+str$(q)+".bmp":3d_scale 33,3,3,3:3d_position 33,0,1.275,0:3d_collision_as_cube 33 3d_mesh 34:3d_load_object 34,rep$+"rouesbgy"+str$(q)+".3ds":if q<4:3d_load_texture 34,rep$+"bgy"+str$(q)+".bmp":else:3d_load_texture 34,rep$+"rouesbgy4.bmp":end_if 3d_chain 34,33:3d_collision_as_cube 34 rot=0:point_x_position o3d_x_position(33):point_z_position o3d_z_position(33) show 3:3d_load_texture 30,rep$+"feueteint.bmp" sound 5:file_load 5,rep$+"ralentibgy.wav":play 5:joue$="ralentibgy.wav" start():son$="start.wav" timer_on 9:timer_on 10:timer_on 11 else gosub fin end_if return
sub start() dim_local cy,cz,cby,cbz,i:cy=500:cby=6:cz=0:cbz=-10 for i=1 to 80:cy=cy+(cby-cy)*0.08:cz=cz+(cbz-cz)*0.08:cam_position 0,cy,cz:wait 50:next i for i=0 to cy step 0.16:point_y_position i:wait 50:next i 3d_show 290 for i=1 to 30 if int(i/10)=i/10 and str$((30-i)/10)<>"0" then 3d_text_change 290,str$((30-i)/10) if i=10 then 3d_load_texture 30,rep$+"feurouge.bmp" if i=20 then 3d_load_texture 30,rep$+"feuorange.bmp" if i=30 then 3d_load_texture 30,rep$+"feuvert.bmp" wait 100 next i 3d_text_change 290,"GO":3d_x_position 290,2.75 sound 6:file_load 6,rep$+"train.wav":lap=-1 end_sub
sub graph1() full_space 0 scene3d 1:full_space 1:height 1,110:top 1,height(0)-148:color 1,192,64,0:3d_target_is 1 3d_box 200,18,2,1:3d_position 200,-10,0,-5:3d_load_texture 200,rep$+"fen.jpg" 3d_box 201,18,2,1:3d_position 201,010,0,-5:3d_load_texture 201,rep$+"fen.jpg" 3d_text 202,"SPEED: 000 km/h":3d_position 202,-9,-0.25,0 3d_text 203,"TIME: 00 : 00 : 00":3d_position 203,01.5,-0.25,0 hide 1 scene3d 2:full_space 2:height 2,height(2)-110:color 2,0,100,0:3d_target_is 2:cam_position 0,2,7 3d_mesh 204:3d_load_object 204,rep$+"hunter1.3ds" :3d_load_texture 204,rep$+"bgy1.bmp" :3d_scale 204,0.5,0.5,0.5 3d_mesh 205:3d_load_object 205,rep$+"hunter2.3ds" :3d_load_texture 205,rep$+"bgy2.bmp" :3d_scale 205,0.5,0.5,0.5 3d_mesh 206:3d_load_object 206,rep$+"hunter3.3ds" :3d_load_texture 206,rep$+"bgy3.bmp" :3d_scale 206,0.5,0.5,0.5 3d_mesh 207:3d_load_object 207,rep$+"hunter4a.3ds":3d_load_texture 207,rep$+"bgy4.bmp":3d_scale 207,0.5,0.5,0.5 3d_mesh 208:3d_load_object 208,rep$+"hunter4b.3ds":3d_load_texture 208,rep$+"rouesbgy4.bmp":3d_chain 208,207 alpha 4:font_name 4,"Consolas":font_size 4,30:font_bold 4:top 4,height(0)-120 end_sub
sub choix() dim_local ang,h,i,j,k,pi,s,fc$,fi$,a$(4):pi=acos(-1):q=1:a$(1)="< Buggy Cross >":a$(2)="< Buggy Dunes >":a$(3)="< Buggy Sands >":a$(4)="< Hummer >" caption 4,a$(q):left 4,(width(0)-text_width(a$(1),4))/2 s=204:for i=0 to 2*pi step pi/2:3d_x_position s,8*sin(i):3d_z_position s,4*cos(i):s=s+1:next i sound 6:file_load 6,rep$+"buggy.mp3":play 6:sound 5:file_load 5,rep$+"select.wav" while scancode<>13 3d_y_rotate 204,ang:3d_y_rotate 205,ang+90:3d_y_rotate 206,ang+180:3d_y_rotate 207,ang+270:ang=ang+0.5 if scancode=37 play 5:play 6 k=h:h=h-2*pi/4:q=q+1:if q>4 then q=1 for j=k to h step -0.05:s=204:for i=j to 2*pi-0.01+j step pi/2:3d_x_position s,8*sin(i):3d_z_position s,4*cos(i):s=s+1:display:next i:next j k=h:caption 4,a$(q) end_if if scancode=39 play 5:play 6 h=k:k=k+2*pi/4:q=q-1:if q<1 then q=4 for j=h to k step 0.05:s=204:for i=j to 2*pi-0.01+j step pi/2:3d_x_position s,8*sin(i):3d_z_position s,4*cos(i):s=s+1:display:next i:next j h=k:caption 4,a$(q) end_if end_while delete 5:delete 6:show 1 end_sub
sub graph2() scene3d 3:full_space 3:height 3,height(0)-150:3d_target_is 3:light_y_position -100000 3d_skybox 1:3d_load_texture_top 1,rep$+"top.JPG":3d_load_texture_left 1,rep$+"left.jpg":3d_load_texture_back 1,rep$+"back.jpg":3d_load_texture_front 1,rep$+"front.jpg":3d_load_texture_right 1,rep$+"right.jpg" 3d_plane 2:3d_u_tile 2,250:3d_v_tile 2,250:3d_rotate 2,90,0,0:3d_position 2,500,-0.1,700:3d_scale 2,250,250,1:3d_load_texture 2,rep$+"sol.bmp": ' terrain ' Le circuit fait avec des 3d_plane 3d_plane 03:3d_x_rotate 03,90: 3d_scale 03,3,100,1:3d_x_position 03,0000:3d_z_position 03,0400:3d_load_texture 03,rep$+"r3.jpg":3d_u_tile 03,1:3d_v_tile 03,20 3d_plane 04:3d_x_rotate 04,90:3d_z_rotate 04,90:3d_scale 04,3,100,1:3d_x_position 04,0515:3d_z_position 04,-085:3d_load_texture 04,rep$+"r3.jpg":3d_u_tile 04,1:3d_v_tile 04,20 3d_plane 05:3d_x_rotate 05,90: 3d_scale 05,3,025,1:3d_x_position 05,1030:3d_z_position 05,0025:3d_load_texture 05,rep$+"r3.jpg":3d_u_tile 05,1:3d_v_tile 05,5 3d_plane 06:3d_x_rotate 06,90:3d_z_rotate 06,90:3d_scale 06,3,075,1:3d_x_position 06,0640:3d_z_position 06,0135:3d_load_texture 06,rep$+"r3.jpg":3d_u_tile 06,1:3d_v_tile 06,15 3d_plane 07:3d_x_rotate 07,90: 3d_scale 07,3,050,1:3d_x_position 07,0250:3d_z_position 07,0370:3d_load_texture 07,rep$+"r3.jpg":3d_u_tile 07,1:3d_v_tile 07,10 3d_plane 08:3d_x_rotate 08,90:3d_z_rotate 08,90:3d_scale 08,3,075,1:3d_x_position 08,0640:3d_z_position 08,0605:3d_load_texture 08,rep$+"r3.jpg":3d_u_tile 08,1:3d_v_tile 08,15 3d_plane 09:3d_x_rotate 09,90: 3d_scale 09,3,100,1:3d_x_position 09,1030:3d_z_position 09,1090:3d_load_texture 09,rep$+"r3.jpg":3d_u_tile 09,1:3d_v_tile 09,20 3d_plane 10:3d_x_rotate 10,90:3d_z_rotate 10,90:3d_scale 10,3,100,1:3d_x_position 10,0515:3d_z_position 10,1575:3d_load_texture 10,rep$+"r3.jpg":3d_u_tile 10,1:3d_v_tile 10,20 3d_plane 11:3d_x_rotate 11,90: 3d_scale 11,3,025,1:3d_x_position 11,0000:3d_z_position 11,1465:3d_load_texture 11,rep$+"r3.jpg":3d_u_tile 11,1:3d_v_tile 11,5 3d_plane 12:3d_x_rotate 12,90:3d_z_rotate 12,90:3d_scale 12,3,075,1:3d_x_position 12,0390:3d_z_position 12,1355:3d_load_texture 12,rep$+"r3.jpg":3d_u_tile 12,1:3d_v_tile 12,15 3d_plane 13:3d_x_rotate 13,90: 3d_scale 13,3,050,1:3d_x_position 13,0780:3d_z_position 13,1120:3d_load_texture 13,rep$+"r3.jpg":3d_u_tile 13,1:3d_v_tile 13,10 3d_plane 14:3d_x_rotate 14,90:3d_z_rotate 14,90:3d_scale 14,3,075,1:3d_x_position 14,0390:3d_z_position 14,0885:3d_load_texture 14,rep$+"r3.jpg":3d_u_tile 14,1:3d_v_tile 14,15 ' Les cubes applatis transparents et invisibles pour tests de collision avec le buggy ==> Si collision=1 alors le buggy est sorti du circuit et sa vitesse sera très réduite! 3d_cube 15,1:3d_scale 15,0730,0.01,2500:3d_position 15,-380,0.1,0700:3d_transparent 15,255:3d_collision_as_cube 15 3d_cube 16,1:3d_scale 16,0700,0.01,2500:3d_position 16,1395,0.1,0700:3d_transparent 16,255:3d_collision_as_cube 16 3d_cube 17,1:3d_scale 17,1060,0.01,0360:3d_position 17,0515,0.1,1770:3d_transparent 17,255:3d_collision_as_cube 17 3d_cube 18,1:3d_scale 18,1060,0.01,0450:3d_position 18,0515,0.1,-325:3d_transparent 18,255:3d_collision_as_cube 18 3d_cube 19,1:3d_scale 19,0780,0.01,0440:3d_position 19,0655,0.1,0370:3d_transparent 19,255:3d_collision_as_cube 19 3d_cube 20,1:3d_scale 20,0780,0.01,0440:3d_position 20,0375,0.1,1120:3d_transparent 20,255:3d_collision_as_cube 20 3d_cube 21,1:3d_scale 21,1000,0.01,0190:3d_position 21,0515,0.1,1465:3d_transparent 21,255:3d_collision_as_cube 21 3d_cube 22,1:3d_scale 22,1000,0.01,0250:3d_position 22,0515,0.1,0745:3d_transparent 22,255:3d_collision_as_cube 22 3d_cube 23,1:3d_scale 23,1000,0.01,0190:3d_position 23,0515,0.1,0025:3d_transparent 23,255:3d_collision_as_cube 23 3d_cube 24,1:3d_scale 24,0220,0.01,0500:3d_position 24,0125,0.1,0370:3d_transparent 24,255:3d_collision_as_cube 24 3d_cube 25,1:3d_scale 25,0220,0.01,0500:3d_position 25,0905,0.1,1120:3d_transparent 25,255:3d_collision_as_cube 25 ' L'arche portail Départ/Arrivée 3d_box 26,20,5,5:3d_z_rotate 26,90:3d_position 26,018,10,15:3d_load_texture 26,rep$+"carreaux.bmp" 3d_box 27,20,5,5:3d_z_rotate 27,90:3d_position 27,-18,10,15:3d_load_texture 27,rep$+"carreaux.bmp" 3d_box 28,31,5,5:3d_position 28,0,17.5,15:3d_load_texture 28,rep$+"carreaux.bmp" 3d_plane 29:3d_u_tile 29,1:3d_v_tile 29,1:3d_rotate 29,90,0,180:3d_scale 29,2.85,2,1:3d_position 29,0,0.05,15:3d_load_texture 29,rep$+"sf.jpg" ' les feux de départ!!! 3d_mesh 30:3d_x_rotate 30,90:3d_z_rotate 30,270:3d_scale 30,6,6,6:3d_position 30,0,15,12.25:3d_load_object 30,rep$+"feux.3ds":3d_load_texture 30,rep$+"feueteint.bmp" ' les box invisibles servant de test pour le franchissement de la ligne de départ/arrivée 3d_box 31,29,10,5:3d_position 31,0,5,12:3d_transparent 31,255:3d_collision_as_faces 31 3d_box 32,29,10,5:3d_position 32,0,5,18:3d_transparent 32,255:3d_collision_as_faces 32 ' le BUGGY 3d_mesh 33:3d_load_object 33,rep$+"bgy"+str$(q)+".3ds":3d_load_texture 33,rep$+"bgy"+str$(q)+".bmp":3d_scale 33,3,3,3:3d_y_position 33,1.275:3d_collision_as_cube 33 3d_mesh 34:3d_load_object 34,rep$+"rouesbgy"+str$(q)+".3ds":if q<4:3d_load_texture 34,rep$+"bgy"+str$(q)+".bmp":else:3d_load_texture 34,rep$+"rouesbgy4.bmp":end_if 3d_chain 34,33:3d_collision_as_cube 34 ' LES IMMEUBLES 3d_box 35,20,040,20:3d_position 35,-040,020,0100:3d_load_texture 35,rep$+"imm01.bmp" 3d_box 36,20,060,20:3d_position 36,-040,030,0200:3d_load_texture 36,rep$+"imm02.bmp" 3d_box 37,80,120,80:3d_position 37,0110,060,0150:3d_load_texture 37,rep$+"imm03.bmp" 3d_box 38,80,060,80:3d_position 38,0110,030,0500:3d_load_texture 38,rep$+"imm04.bmp" 3d_box 39,30,120,30:3d_position 39,-040,060,0650:3d_load_texture 39,rep$+"imm05.bmp" 3d_box 40,40,060,40:3d_position 40,0110,030,0800:3d_load_texture 40,rep$+"imm01.bmp" 3d_box 41,40,100,40:3d_position 41,0390,050,0800:3d_load_texture 41,rep$+"imm07.bmp" 3d_box 42,40,120,40:3d_position 42,0700,060,0950:3d_load_texture 42,rep$+"imm06.bmp" 3d_box 43,40,100,40:3d_position 43,0700,050,0800:3d_load_texture 43,rep$+"imm11.bmp" 3d_box 44,80,120,80:3d_position 44,0910,060,1100:3d_load_texture 44,rep$+"imm03.bmp" 3d_box 45,50,130,50:3d_position 45,0700,065,1300:3d_load_texture 45,rep$+"imm08.bmp" 3d_box 46,50,130,50:3d_position 46,0910,065,1340:3d_load_texture 46,rep$+"imm09.bmp" 3d_box 47,50,070,50:3d_position 47,0700,035,1430:3d_load_texture 47,rep$+"imm10.bmp" 3d_box 48,50,070,50:3d_position 48,0390,035,1300:3d_load_texture 48,rep$+"imm10.bmp" 3d_box 49,50,070,50:3d_position 49,0390,035,1430:3d_load_texture 49,rep$+"imm10.bmp" 3d_box 50,40,100,40:3d_position 50,0110,050,1430:3d_load_texture 50,rep$+"imm11.bmp" 3d_box 51,20,080,20:3d_position 51,-040,040,1500:3d_load_texture 51,rep$+"imm02.bmp" 3d_box 52,20,080,20:3d_position 52,0110,040,1530:3d_load_texture 52,rep$+"imm02.bmp" 3d_box 53,20,080,20:3d_position 53,0110,040,1630:3d_load_texture 53,rep$+"imm02.bmp" 3d_box 54,20,080,20:3d_position 54,0250,040,1530:3d_load_texture 54,rep$+"imm02.bmp" 3d_box 55,20,080,20:3d_position 55,0250,040,1630:3d_load_texture 55,rep$+"imm02.bmp" 3d_box 56,20,080,20:3d_position 56,0390,040,1530:3d_load_texture 56,rep$+"imm02.bmp" 3d_box 57,20,080,20:3d_position 57,0390,040,1630:3d_load_texture 57,rep$+"imm02.bmp" 3d_box 58,40,120,40:3d_position 58,0670,060,1530:3d_load_texture 58,rep$+"imm06.bmp" 3d_box 59,40,120,40:3d_position 59,0670,060,1630:3d_load_texture 59,rep$+"imm06.bmp" 3d_box 60,40,120,40:3d_position 60,0810,060,1530:3d_load_texture 60,rep$+"imm06.bmp" 3d_box 61,40,120,40:3d_position 61,0810,060,1630:3d_load_texture 61,rep$+"imm06.bmp" 3d_box 62,20,040,20:3d_position 62,1060,020,1500:3d_load_texture 62,rep$+"imm01.bmp" 3d_box 63,50,130,50:3d_position 63,0980,020,-020:3d_load_texture 63,rep$+"imm09.bmp" 3d_box 64,50,130,50:3d_position 64,1100,020,0030:3d_load_texture 64,rep$+"imm08.bmp" 3d_box 65,80,060,80:3d_position 65,0890,030,0220:3d_load_texture 65,rep$+"imm04.bmp" 3d_box 66,80,060,80:3d_position 66,0640,030,0220:3d_load_texture 66,rep$+"imm04.bmp" 3d_box 67,80,060,80:3d_position 67,0390,030,0220:3d_load_texture 67,rep$+"imm04.bmp" ' LES MAISONS 3d_mesh 68:3d_load_object 68,rep$+"chap.3ds":3d_load_texture 68,rep$+"chap.bmp":3d_scale 68,15,15,15:3d_position 68,1150,0,1100 3d_mesh 69:3d_load_object 69,rep$+"dom2.3ds":3d_load_texture 69,rep$+"dom2.bmp":3d_scale 69,15,15,15:3d_position 69,0910,0,0750:3d_y_rotate 69,90 3d_mesh 70:3d_load_object 70,rep$+"dom3.3ds":3d_load_texture 70,rep$+"dom3.bmp":3d_scale 70,15,15,15:3d_position 70,0910,0,0530 3d_mesh 71:3d_load_object 71,rep$+"dom5.3ds":3d_load_texture 71,rep$+"dom5.jpg":3d_scale 71,07,07,07:3d_position 71,1100,0,0750 3d_mesh 72:3d_load_object 72,rep$+"dom6.3ds":3d_load_texture 72,rep$+"dom6.jpg":3d_scale 72,15,15,15:3d_position 72,0390,0,0530:3d_y_rotate 72,180 3d_mesh 73:3d_load_object 73,rep$+"dom1.3ds":3d_load_texture 73,rep$+"dom1.jpg":3d_scale 73,15,15,15:3d_position 73,0700,0,0530 3d_mesh 74:3d_load_object 74,rep$+"dom4.3ds":3d_load_texture 74,rep$+"dom4.bmp":3d_scale 74,10,10,10:3d_position 74,1080,0,0610 ' LES RAILS 3d_plane 75:3d_x_rotate 75,90:3d_z_rotate 75,90:3d_scale 75,2,250,1:3d_position 75,500,-0.05,1200:3d_load_texture 75,rep$+"rail.jpg":3d_u_tile 75,1:3d_v_tile 75,15 3d_plane 76:3d_u_tile 76,1:3d_v_tile 76,1:3d_rotate 76,90,0,0:3d_scale 76,3,2,1:3d_position 76,0780,0.01,1200:3d_load_texture 76,rep$+"railpg.jpg" 3d_plane 77:3d_u_tile 77,1:3d_v_tile 77,1:3d_rotate 77,90,0,0:3d_scale 77,3,2,1:3d_position 77,1030,0.01,1200:3d_load_texture 77,rep$+"railpg.jpg" ' ET LE TRAIN ' la loco 3d_mesh 78:3d_load_object 78,rep$+"loco_tgm3.3ds":3d_load_texture 78,rep$+"loco_tgm3.bmp" 3d_mesh 79:3d_load_object 79,rep$+"loco_boggies.3ds":3d_load_texture 79,rep$+"loco_boggies.bmp" 3d_chain 78,79:3d_position 79,1512,-0.5,1200:3d_scale 79,45,45,45:3d_x_rotate 79,90:3d_z_rotate 79,90:3d_collision_as_cube 79 ' le wagon 1 3d_mesh 80:3d_load_object 80,rep$+"w_body.3ds":3d_load_texture 80,rep$+"w.jpg" 3d_mesh 81:3d_load_object 81,rep$+"w_vitr.3ds":3d_chain 80,81:3d_transparent 81,128 3d_mesh 82:3d_load_object 82,rep$+"w_boog.3ds":3d_color 82,0,10,10:3d_chain 81,82 3d_position 82,1600,-0.5,1200:3d_scale 82,50,50,50:3d_x_rotate 82,90: 3d_z_rotate 82,90:3d_collision_as_cube 82 ' le wagon 2 3d_mesh 83:3d_load_object 83,rep$+"w_body.3ds":3d_load_texture 83,rep$+"w.jpg" 3d_mesh 84:3d_load_object 84,rep$+"w_vitr.3ds":3d_chain 83,84:3d_transparent 84,128 3d_mesh 85:3d_load_object 85,rep$+"w_boog.3ds":3d_color 85,0,10,10:3d_chain 84,85 3d_position 85,1697.25,-0.5,1200:3d_scale 85,50,50,50:3d_x_rotate 85,90: 3d_z_rotate 85,90:3d_collision_as_cube 85 ' le wagon 3 3d_mesh 86:3d_load_object 86,rep$+"w_body.3ds":3d_load_texture 86,rep$+"w.jpg" 3d_mesh 87:3d_load_object 87,rep$+"w_vitr.3ds":3d_chain 86,87:3d_transparent 87,128 3d_mesh 88:3d_load_object 88,rep$+"w_boog.3ds":3d_color 88,0,10,10:3d_chain 87,88 3d_position 88,1794.5,-0.5,1200:3d_scale 88,50,50,50:3d_x_rotate 88,90: 3d_z_rotate 88,90:3d_collision_as_cube 88 ' les panneaux de signalisation du train ' panneau 1 3d_cylinder 89,10,0.1,0.1:3d_position 89,764,5,1150:3d_load_texture 89,rep$+"imm08.bmp" 3d_box 90,3.25,1,0.2:3d_position 90,764,8.5,1150:3d_load_texture 90,rep$+"pnrg.bmp" 3d_mesh 91:3d_load_object 91,rep$+"pntg.3ds":3d_load_texture 91,rep$+"pntg.bmp":3d_x_rotate 91,90:3d_scale 91,10,10,10:3d_position 91,764,-5.2,1150 ' panneau 2 3d_cylinder 92,10,0.1,0.1:3d_position 92,796,5,1250:3d_load_texture 92,rep$+"imm08.bmp" 3d_box 93,3.25,1,0.2:3d_position 93,796,8.5,1250:3d_load_texture 93,rep$+"pnrg.bmp" 3d_mesh 94:3d_load_object 94,rep$+"pntg.3ds":3d_load_texture 94,rep$+"pntg.bmp":3d_x_rotate 94,90:3d_scale 94,10,10,10:3d_position 94,796,-5.2,1250 ' panneau 3 3d_cylinder 95,10,0.1,0.1:3d_position 95,1014,5,1150:3d_load_texture 95,rep$+"imm08.bmp" 3d_box 96,3.25,1,0.2:3d_position 96,1014,8.5,1150:3d_load_texture 96,rep$+"pnrg.bmp" 3d_mesh 97:3d_load_object 97,rep$+"pntg.3ds":3d_load_texture 97,rep$+"pntg.bmp":3d_x_rotate 97,90:3d_scale 97,10,10,10:3d_position 97,1014,-5.2,1150 ' panneau 4 3d_cylinder 98,10,0.1,0.1:3d_position 98,1046,5,1250:3d_load_texture 98,rep$+"imm08.bmp" 3d_box 99,3.25,1,0.2:3d_position 99,1046,8.5,1250:3d_load_texture 99,rep$+"pnrg.bmp" 3d_mesh 100:3d_load_object 100,rep$+"pntg.3ds":3d_load_texture 100,rep$+"pntg.bmp":3d_x_rotate 100,90:3d_scale 100,10,10,10:3d_position 100,1046,-5.2,1250
' << YA UN BUG ICI sur les 3D_TEXT >> §§§§§§§§§§§§§§§§§§§§§§ << JACK EST AU COURANT >> §§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§ 3d_text 290,"3":3d_hide 290:3d_y_rotate 290,180:3d_scale 290,4,4,4:3d_color 290,255,50,50:3d_position 290,1,6,5 end_sub
' - plane n'a pas de collision ==> donc le subterfuge des cubes applatis et transparent de chaque coté du circuit. ' Si les roues du véhicule sont en collision avec ces cubes donc on ralentit le véhicule au maximum. mais il aurait ' été plus simple de faire si les roues du véhicule en collision avec la route, on roule. ' - il n'y a pas de possibilité de faire des courbes avec un plane, box, cube, sphere, cylindre, torus ou cone en ' utilisant scale ou autre... ' C'est pour cela que je propse à JACK si il est possible de faire une instruction qui permettrait de tordre un objet 3d ' suivant un axe x,y ou z. Par exemple 3D_TWIST N,20,90,270 appliquerai une déformation à l'objet 3d N une déformation de ' 20° sur l'axe X, 90° sur l'axe y et 270° sur l'axe z. Cela impliquerai également les instructions: ' 3D_X_TWIST, 3D_Y_TWIST et 3D_Z_TWIST. Moi je me vois bien faire un ressort avec :
' scene3d 1:full_space 1 ' cam_z_position 20 ' 3d_cylinder 1,10,1,1 ' 3D_Y_TWIST 1,750
fin: timer_off_all if object_exists(5)=1 then delete 5 if object_exists(6)=1 then delete 6 3d_chain_break 87,88:3d_chain_break 86,87:3d_chain_break 84,85:3d_chain_break 83,84:3d_chain_break 81,82:3d_chain_break 80,81:3d_chain_break 78,79 if o3d_object_exists(33)=1 and o3d_object_exists(34)=1 then 3d_chain_break 34,33 3d_chain_break 208,207 terminate return Si cela peut t'aider à résoudre le problème... A+ | |
|