TGC Codebase Backup



bush shooter by Anonymous Coder

2nd Jun 2004 9:58
Summary

you shoot a simple sprite of bush.



Description

your kills are counted and there is a crap timer thing counting up. There are some sounds that I got with Dark Basic.



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    ammo=1

load sound "rifle.wav",1
load sound "reload.wav",2


circle 15,15,10

get image 1,5,5,26,26
cls
hide mouse

load bitmap "georgebush.jpg"
get image 2,60,30,200,200

cls
sprite 2,rnd(640),rnd(480),2

scale sprite 2,50


sync on



DO
z=z+1
time=z/40
set cursor 0,0
print "kills ",kills
set cursor 0,30
print time
if time=20 then end

sprite 1,mousex(),mousey(),1

if mouseclick()=1 then if sprite hit(1,2)=1 then if ammo>0 then dead=1
if dead=1 then sprite 2,rnd(600),rnd(430),2
if dead=1 then kills=kills+1
dead=0


if mouseclick()=1 then if ammo>0 then play sound 1
if mouseclick()=1 then ammo=ammo-1
set cursor 0,20
if mouseclick()=1 then print "RELOAD"

if mouseclick()=2 then ammo=1
if mouseclick()=2 then play sound 2
ammocheck=0
sync
cls
LOOP