Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Please help!
- Dragonfly4237
- New to Scratch
1 post
Please help!
I have a shark swimming across the bottom of the stage. When it crosses paths with the scuba diver I want the shark to change costumes and the scuba diver to hide. I have tried many different things. I shared it so maybe you can help. thanks…
- maddogmax
- Scratcher
100+ posts
Please help!
I hope I helped
when green flag clicked
go to x: (0) y: (-150)
set [direction for shark v] to [2]
forever
move (direction for shark) steps
if <(x position) > [200]> then
set [direction for shark v] to [-2]
end
if <(x position) < [-200]> then
set [direction for shark v] to [2]
end
if <touching [diver v]?> then
broadcast [shark touches diver v]
next costume
end
wait (0.1) secs
end
when I receive [shark touches diver v]
hide
stop [all v]
Last edited by maddogmax (Feb. 23, 2014 10:25:39)
- Discussion Forums
- » Help with Scripts
- » Please help!