Simple Stop Light Animation
Author |
Message |
smith_scott_04
|
Posted: Sun Nov 16, 2003 10:38 pm Post subject: Simple Stop Light Animation |
|
|
Here is a simple stop light animation i made while i was bored.
code: |
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
|
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Thuged_Out_G
|
Posted: Thu Nov 20, 2003 5:24 pm Post subject: (No subject) |
|
|
i could be wrong...but isnt the green lught usually on the bottom, and the red on top? |
|
|
|
|
|
poly
|
Posted: Thu Nov 20, 2003 8:12 pm Post subject: (No subject) |
|
|
yeah... Thuged_Out_G is right, you have the lights reversed there |
|
|
|
|
|
Andy
|
Posted: Fri Nov 21, 2003 7:15 pm Post subject: (No subject) |
|
|
somebody obviously failed their G1 test... |
|
|
|
|
|
rizzix
|
Posted: Fri Nov 21, 2003 10:11 pm Post subject: (No subject) |
|
|
well he knows green is go right? |
|
|
|
|
|
Andy
|
Posted: Sun Nov 23, 2003 4:06 pm Post subject: (No subject) |
|
|
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
|
Posted: Sun Nov 30, 2003 5:22 pm Post subject: (No subject) |
|
|
Wow that was a lot of code for something so simple
code: |
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
|
|
|
|
|
|
|
|
|