hmmm
// For every sprite: when green flag clicked go to x: (pick random (-240) to (240)) y: (pick random (-180) to (180)) // For the second one, place a hidden sprite at 0,0 and give it this script when gf clicked forever //required if <<mouse down?> and <(distance to [mouse-pointer v]) < (var)>> broadcast [statement v] wait until <not<<mouse down?> or <(distance to [mouse-pointer v]) < (var)>>> end
Last edited by RCScratch (2012-11-09 18:03:51)
Offline
"And is it possible to bind actions (for example mouse clicking) to a fixed X and Y area?
For example if I click on area from X 1-100 and Y 1-100 then action."
For this, I'd do:
if <mouse down?>
if <a<mouse x<b>> and <c<mouse x<d>
...
How you order the different conditions is up to you.
Alternatively, you could create sprites the same colour as the background, and use 'when (sprite x) clicked: ...'
Last edited by Llamalover (2012-11-10 14:08:42)
Offline
Ok I know but writing it will not be easy
if <<<<mouse down?> and <(mouse x) > (-100)>> and <(mouse x) < (100)>> and <<(mouse y) < (100) > and <(mouse y) > (-100)> Statement endTechnical difficulties prevent this scratchblock from displaying properly
Last edited by RCScratch (2012-11-11 10:50:47)
Offline
RCScratch wrote:
Ok I know but writing it will not be easy
if <<<<<(mouse down?) and <(mouse x) > (-100)>> and <(mouse x) < (100)>> and <(mouse y) > (-100)>> and <(mouse y) < (100)>>> Statement end
Fixed to some extent.
Offline
If you put a sprite there where the ghost effect is 100 it still responds to the "when sprite clicked" block.
Offline