Computer Science Canada

View.WhatDotColour Help Needed

Author:  born-to-die [ Mon Jun 02, 2008 4:00 pm ]
Post subject:  View.WhatDotColour Help Needed

when my character lands on a certain colour it does the command within the if statement(draw rectangle lets say)...but once you move off it the rectangle dissapears...i want it to stay...and if possible...make the coloured dot dissapear that triggered the rectangles appearance...

if View.WhatDotColour (x, y) = 13 then
drawfillbox(500, 200, 640, 220, 10)
end if

Author:  Insectoid [ Mon Jun 02, 2008 4:23 pm ]
Post subject:  RE:View.WhatDotColour Help Needed

Hmm, I've never used View.WhatDotColor before (though I have used whatdotcolor)

Try using whatdotcolor instead, that's all I can do unless you post your entire code.

Author:  Tony [ Mon Jun 02, 2008 4:30 pm ]
Post subject:  Re: RE:View.WhatDotColour Help Needed

insectoid @ Mon Jun 02, 2008 4:23 pm wrote:
Try using whatdotcolor instead

whatdotcolor is deprecated.

If you want the drawn rectangle to stay even after the trigger (coloured circle) has disappeared, then you'd need something else to remember that this event has occurred. Such as
Turing:

if View.WhatDotColour (x, y) = 13 or event_flag then
   ...

where event_flag is a boolean variable.

Also, please use the [ syntax="turing" ] tags.


: