Reputation: 507
I want to use a paint command but think have a file problem, not a code problem. This is the code:
to color-white
if mouse-down?
[ask patch mouse-xcor mouse-ycor
[ set pcolor white]]
end
It simply paints in real time when the left mouse button is pushed and pointer passes over the screen. The code works if its written in a new Netlogo session. But if it's used in this file:
paint won't appear in real time. Please help.
Upvotes: 2
Views: 44
Reputation: 30453
I'd suggest adding a call to display
in your code whenever you want the display to update. That's how the models in the NetLogo Models Library do it.
"continuous" view updates is a somewhat reasonable alternative, but it involves giving up all control of when view updates occur.
Upvotes: 2
Reputation: 507
Problem solved: changed view updates from "on ticks" to "continuous".
Upvotes: 1