TGC Codebase Backup



Colored Dots by Insane Knux

12th Dec 2005 22:23
Summary

Press down the mouse button to make a dot. Click & drag to make tons of dots. Right click to clear the screen.



Description



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



mx = mousex()

my = mousey()

cr = rnd(255)

cg = rnd(255)

cb = rnd(255)
REM Keep the mouse X and Y safe in a variable


REM Check to see if the left mouse button is down
if mouseclick() = 1

 REM Create the dot and color it
 dot mx, my, rgb(cr, cg, cb)

endif


REM Check to see if the right mouse button is down
if mouseclick() = 2

 REM Clear the screen
 cls

endif



loop