
-----------------------------------
skatelhs
Thu May 29, 2003 12:44 pm

Pictures in a program?
-----------------------------------
hi, im making a game.  I want to have a picture show by my crosshair when you click, but I dont know how to put one in and I dont want to use 100 different drawline commands to make it.  Im talking about one of those spark-lookin things that comes out of the end of your gun when you shoot. heres the code if you want to see what ive got so far 
View.Set ("offscreenonly")
var x, y, button, bulletsleft : int := 0

bulletsleft := 8

loop
    %Bullets Left- Shown at the Top
    locate (1, 1)
    put "There are ", bulletsleft, " bullets left in the Clip"
    %Crosshair
    drawfillbox (x - 15, y - 1, x + 15, y + 1, white)
    drawfillbox (x - 1, y - 15, x + 1, y + 15, white)
    Mouse.Where (x, y, button)
    if button = 1 and bulletsleft > 0 then
        bulletsleft := bulletsleft - 1
        Music.PlayFile ("gunshot.wav")
    else
        %notshooting
        drawfillbox (x - 15, y - 1, x + 15, y + 1, brightblue)
        drawfillbox (x - 1, y - 15, x + 1, y + 15, brightblue)
        View.Update
        delay (10)

    end if
    if bulletsleft 