TGC Codebase Backup



kill the zombies by pollywog

16th Jan 2009 15:49
Summary

kill the zombies.....Duh follow the link to download it http://www.mediafire.com/?sharekey=28923a5dcba37fba2244b8884b2cb7e6e04e75f6e8ebb871



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    Rem Project: zombie
Rem Created: 1/14/2009 2:34:45 PM

Rem ***** Main Source File *****
zombiewalk = 1
set image colorkey 255, 0, 254
autocam off
dim ZombieIsShot(50)
global dim z#(50)
rem load sounds
 load sound "media/sounds/2scream.wav", 1
 load sound "media/sounds/aaa.wav", 2
 load sound "media/sounds/Ahhhhhhh.wav", 3
 load sound "media/sounds/deadscrm.wav", 4
 load sound "media/sounds/diefoe3.wav", 5
 load sound "media/sounds/lburn2.wav", 6
 load sound "media/sounds/maleyell.wav", 7
 load sound "media/sounds/msfear2.wav", 8
 load sound "media/sounds/Ouche.wav", 9
 load sound "media/sounds/scream2.wav", 10
 load sound "media/sounds/SCREAM_4.wav", 11
 load sound "media/sounds/gunshot.wav", 12
 load music "media/sounds/Samba De Mon Coeur Qui Bat - Coralie Clement.mp3" , 1
 loop music 1

rem load the sky
   sky = 3
   set camera range 2.5,15000
   load object "media\highland rain\hr.x",sky
   position object sky,256,30,0
   set object texture sky,2,1
   set object light sky,0
   set object cull sky,0
   yrotate object sky,270
   scale object sky,250,250,250

rem load anthony
position camera 0,10,-3
   make object plain 2, 20, 20
   load image "media\brian.bmp",1,1
   texture object 2,1
   set object transparency 2, 1

rem load bullet
   position object 2, x#, y#, 100
   make object sphere 4, 1, 10, 10
   hide object 4

rem load the zombies
for i = 1 to 50
   load object "media\zombie\L-Zombie-Move.x", 100 + i, 1
   load object "media\zombie\L-Zombie-Die.x", 200 + i, 1
   hide object 200 + i
   scale object 100 + i, 600,600,600 : scale object 200 + i, 600,600,600
   rotate object 100 + i, 0,180,0 : rotate object 200 + i, 0,180,0
   set object speed 100 + i, 5 :   set object speed 200 + i, 5
   loop object 100 + i,5, total object frames (100 + i)
   rem position the 5 rows of zombies
    if i <= 10 then z#(i) = 0
    if i > 10 and i <= 20 then z#(i) = -10
    if i > 20 and i <= 30 then z#(i) = -20
    if i > 30 and i <=40  then z#(i) = -30
    if i > 40 then z#(i) = -50
next i


do
 if losegame = 1 or wingame = 1 then exit
 rem move anthony
 if leftkey() then  move object right 2,.1
 if rightkey() then move object left  2,.1

 rem manage the bullet
  if inkey$() = chr$(32) and shotfired = 0
   shotfired = 1 : show object 4 : play sound 12
  endif
 if shotfired = 1 then inc zBullet#
 position object 4, object position x(2) - 5, object position y(2)+4, object position z(2) - zBullet#

 rem manage the zombies
 x# = -20
 for i = 1 to 50
    if x# > 20 then x# = -20
   x# = x# + 4
   if ZombieIsShot(i) = 0 then z#(i)=z#(i) + .02
   position object i + 100, x#, -2, z#(i) :  position object i + 200, x#, -2, z#(i)
   if object position z(4) < object position z (i+100) and object position x(4) < object position x(i+100) + 2 and object position x(4) > object position x(i+100) -2 and ZombieIsShot(i) = 0
      ZombieIsShot(i) = 1 : play sound rnd(10) + 1 :  hide object (i+100): hide object 4: shotfired = 0: zBullet# = 0 : inc deathtoll : show object (i+200) : play object (i+200)
   endif
   if zBullet# > 101
      hide object 4 : shotfired = 0 : zBullet# = 0
   endif
   if object position z(i+100) > 70 then losegame = 1
   if deathtoll > 49 then wingame = 1
 next i
loop
if losegame = 1
   load bitmap "media\zombie-manual-wallpaper.jpg",2
else
  load bitmap "media\zombie-attack_thumbnail.jpg",2
endif
copy bitmap 2,0,0,1024,768,0,0,0,screen width(), screen height()
sync
sleep 3000
 WAIT KEY
END