
-----------------------------------
element4l
Tue Oct 16, 2007 4:45 pm

Defend the school (lol) one click at a time
-----------------------------------
Ok. this is my final project for my Turing class. It's very early in development, but I need to get this fixed before moving on. As it is now, you can just hold your mouse button over the guys and they'll die (which would be cheating) They need to click 5 time individually to kill them. So basically, the soldiers run, you "kill" them and they go off screen and come back (supposedly as a different person). I'd also like to know if it would be possible to have more people at the same time on the screen without having to manually create them, like bot3, bot4 etc.



View.Set ("graphics:800;400,position:center;center,nobuttonbar,offscreenonly,title: Getting the day off")

var pos1 : int := 0
var pos2 : int := -40
var pos3 : int := -80
var up, up2, up3 : int := 0
var lvl, diff : int := 3
var speed1, speed2, speed3 : int := 1
var bot : int := 0
var cash : int := 100
var hits1, hits2, hits3 : int := 0

procedure bots
    pos1 += speed1
    Pic.ScreenLoad ("bot1.bmp", pos1, up, picUnderMerge)
    if pos1 >= 400 then
        speed1 := 0
    end if
end bots

procedure bots2
    pos2 += speed2
    Pic.ScreenLoad ("bot2.bmp", pos2, up2, picUnderMerge)
    if pos2 >= 405 then
        speed2 := 0
    end if
end bots2

procedure bots3
    pos3 += speed3
    Pic.ScreenLoad ("bot3.bmp", pos3, up3, picUnderMerge)
    if pos3 >= 410 then
        speed3 := 0
    end if
end bots3

procedure attack
    var x, y, b : int
    mousewhere (x, y, b)
    if x >= pos1 and x = up and y = pos1 and x = up and y = pos2 and x = up2 and y = pos2 and x = up2 and y = pos3 and x = up3 and y = pos3 and x = up3 and y 