3D Friction Menu Base by Louiz ofRohr26th Aug 2004 16:51
|
---|
Summary A menu that you use 1, 2, 3, 4, 5, 6 buttons to change place for the camera goto with friction. Description This is a great, really great project... You use the 1, 2, 3, 4, 5 ou 6 button Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com REM OPÇÕES BÃSiCAS DA TELA rem Sincronia da tela, é importante como o fps no flash sync on sync rate 60 rem xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rem Neblina a uma certa distância, para limitar o tamanho do cenáro (alcance de visão) fog on fog distance 100 fog color rgb(0,0,0) backdrop on color backdrop rgb(0,0,0) rem xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx REM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX REM CORES PRÉ-DEFiNiDAS (Define colors) REM CORES PRÉ-DEFiNiDAS (Define colors) vermelhoescuro = rgb(150,0,0) verdeclaro = rgb(0,250,0) azulclaro = rgb(0,0,250) amareloclaro = rgb(250,250,0) rosa = rgb(200,0,200) cinza = rgb(150,150,150) REM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX REM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX REM CAiXAS (BOXES) make object box 1, 100, 20, 100 position object 1, 0, 0, 0 color object 1, verdeclaro Y1# = 50 Z1# = -80 make object box 2, 100, 20, 100 position object 2, 0, 20, 100 color object 2, amareloclaro Y2# = 70 Z2# = 20 make object box 3, 100, 20, 100 position object 3, 0, 40, 200 color object 3, rosa Y3# = 90 Z3# = 120 make object box 4, 100, 20, 100 position object 4, 0, 60, 300 color object 4, cinza Y4# = 110 Z4# = 220 make object box 5, 100, 20, 100 position object 5, 0, 80, 400 color object 5, vermelhoescuro Y5# = 130 Z5# = 320 REM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX REM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX REM POSiÇÃO iNiCiAL DA CÂMERA (Initial camera position) position camera 0, 50, Z1# xrotate camera 30 REM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX REM AÇÕES PRiNCiPAiS A SEREM REPETiDAS (Main loop) DO `REM CONTROLES (Controls) if scancode()=2 THEN vai# = 1 if scancode()=3 THEN vai# = 2 if scancode()=4 THEN vai# = 3 if scancode()=5 THEN vai# = 4 if scancode()=6 THEN vai# = 5 REM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX REM MOVE A CÂMERA ATÉ O BLOCO COM FRiCÇÃO (Move camera to boxex with friction) REM MOVE A CÂMERA ATÉ O BLOCO COM FRiCÇÃO (Move camera to boxex with friction) xx# = camera position x() : yy# = camera position y() : zz# = camera position z() if vai#=1 THEN position camera xx# + 0, yy# + (Y1# - yy#)/20, zz# + (Z1# - zz#)/20 if vai#=2 THEN position camera xx# + 0, yy# + (Y2# - yy#)/20, zz# + (Z2# - zz#)/20 if vai#=3 THEN position camera xx# + 0, yy# + (Y3# - yy#)/20, zz# + (Z3# - zz#)/20 if vai#=4 THEN position camera xx# + 0, yy# + (Y4# - yy#)/20, zz# + (Z4# - zz#)/20 if vai#=5 THEN position camera xx# + 0, yy# + (Y5# - yy#)/20, zz# + (Z5# - zz#)/20 REM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX REM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX REM ATUALiZA A TELA (Update screen) sync REM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX REM REPETE TUDO DESDE O "DO" (Goto "DO" and play again) LOOP REM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |