
-----------------------------------
smith_scott_04
Sun Nov 16, 2003 10:38 pm

Simple Stop Light Animation
-----------------------------------
Here is a simple stop light animation i made while i was bored.



var colo : int := 0
var d : int := 50
var x, y : int
x := 300
y := 220
var boxx1 : int := 230
var boxy1 : int := 50
var boxx2 : int := 370
var boxy2 : int := 385

drawfilloval (x, y, d, d, colo)
drawbox (boxx1, boxy1, boxx2, boxy2, red)

loop

    for count : 1 .. 3

        if count = 1 then
            colo := green
            drawfilloval (x, y + 100, d, d, colo)
            delay (1000)
            cls
            drawbox (boxx1, boxy1, boxx2, boxy2, red)
        end if

        if count = 2 then
            colo := yellow
            drawfilloval (x, y, d, d, colo)
            delay (1000)
            cls
            drawbox (boxx1, boxy1, boxx2, boxy2, red)
        end if

        if count = 3 then
            colo := red
            drawfilloval (x, y - 100, d, d, colo)
            delay (1000)
            cls
            drawbox (boxx1, boxy1, boxx2, boxy2, red)
        end if
        delay (10)
    end for
end loop


-----------------------------------
Thuged_Out_G
Thu Nov 20, 2003 5:24 pm


-----------------------------------
i could be wrong...but isnt the green lught usually on the bottom, and the red on top? :?

-----------------------------------
poly
Thu Nov 20, 2003 8:12 pm


-----------------------------------
yeah... Thuged_Out_G is right, you have the lights reversed there

-----------------------------------
Andy
Fri Nov 21, 2003 7:15 pm


-----------------------------------
somebody obviously failed their G1 test...

-----------------------------------
rizzix
Fri Nov 21, 2003 10:11 pm


-----------------------------------
well he knows green is go right?

-----------------------------------
Andy
Sun Nov 23, 2003 4:06 pm


-----------------------------------
lol, thats not where most ppl have trouble with, its red means stop that ppl dont understand. i noe two ppl, they both got hit from the rear cuz some old lady didnt brake on a red light.

-----------------------------------
nis
Sun Nov 30, 2003 5:22 pm


-----------------------------------
Wow that was a lot of code for something so simple


drawbox (0, 0, 150, 300, 7)
loop
    drawfilloval (75, 50, 40, 40, brightgreen)
    delay (500)
    drawfilloval (75, 50, 40, 40, 0)
    drawfilloval (75, 150, 40, 40, yellow)
    delay (500)
    drawfilloval (75, 150, 40, 40, 0)
    drawfilloval (75, 250, 40, 40, brightred)
    delay (500)
    drawfilloval (75, 250, 40, 40, 0)
end loop

