ID:160841
 
Code:
obj
Square
icon='back.dmi'
density=1
Click()
if(!usr.isdrawing)return
src.icon='colorsquare.dmi'
src.icon += rgb(usr.cred,usr.cgreen,usr.cblue)


Problem:

I have to click each little square to draw my pic, I want to just click and drag the color to draw my picture.
If you want something to happen when the mouse is dragged, you need to use MouseDrag(). Click() is for doing something when the mouse is clicked. Sorry, but duh.
In response to Kaioken
Kaioken wrote:
If you want something to happen when the mouse is dragged, you need to use MouseDrag(). Click() is for doing something when the mouse is clicked. Sorry, but duh.

I don't get how you do it. <_<

I've read on the reference and it says:

Format:
MouseDrag(over_object,src_location,over_location)
Args:
over_object: the object under the mouse pointer
src_location: the turf or stat panel from where the src object was dragged
over_location: the turf or stat panel containing the object under the mouse pointer
This is called while dragging this object by pressing and holding the left mouse button over the object and moving the mouse. The over_object may be null if dragging over a stat panel or over other empty space.

Don't define this unless you need it, because it generates extra communication that is otherwise avoided. Most operations can be done through Click(), DblClick(), and MouseDrop(). The other procedures are simply available for completeness.
In response to Howey
All you would do is edit the over_object >_<