Pages: 1
Hi,
Whatever code I tried, I was unable to get it right.
This is the latest version:
when gf clicked set size to 20% hide wait (1) secs show forever glide (4) secs to x: pick random (260) to (-260) y: pick random (110) to (-100) if <touching [sprite3]? Broadcast [event 2]What I want to achive: this code block is of a sprite that movesin a random patern.
Offline
Try adding a 'stop script' block after the 'broadcast event 2' block, like this:
when gf clicked set size to (20) % hide wait (1) secs show forever glide [4] secs to x: < (pick random (260) to (-260) > y: < (pick random (110) to (-100) > if < touching [Sprite3 v] > broadcast [event 2 v] stop script end endMaybe that will help.
Offline
Tastycakelover wrote:
Try adding a 'stop script' block after the 'broadcast event 2' block, like this:
when gf clicked set size to (20) % hide wait (1) secs show forever glide (4) secs to x: (pick random (260) to (-260)) y: (pick random (110) to (-100)) if < touching [Sprite3 v]?> broadcast [event 2 v] stop script endMaybe that will help.
I fixed your scratchblocks code, though that still wouldn't work. Here's what I would use:
when gf clicked set size to (20) % hide wait (1) secs show forever glide (4) secs to x: (pick random (260) to (-260)) y: (pick random (110) to (-100)) when gf clicked forever if < touching [Sprite3 v]?> broadcast [event 2 v] endI hope that this helps!
Last edited by ErnieParke (2012-10-20 16:56:26)
Offline
udiamr wrote:
Thank you so much Ernie! It does work!
I spent 6 hours yesterday trying to figure out whats wrong
That's a lot of work. I can already see that you're very persistant. Anyway, your welcome!
Offline
Pages: 1