Discuss Scratch
- Discussion Forums
- » Project Ideas
- » Making a Magic 8 ball
- Turbo-Code1000
-
Scratcher
26 posts
Making a Magic 8 ball
The Magic 8 Ball has 5 options, i will tell you how to make it.
a)
1. Create a triangle sprite
2. Create a Magic 8 Ball sprite
3. In the triangle sprite put in this code:
a)
1. Create a triangle sprite
2. Create a Magic 8 Ball sprite
3. In the triangle sprite put in this code:
when this sprite clicked4. Now in the Magic 8 ball sprite, we want it to choose a random item so put in this code:
broadcast [start v]
when I receive [start v]
set [item v] to (pick random (1) to (5))
if <(item) = [1]> then
say [yes] for (2) secs
end
if <(item) = [2]> then
say [no] for (2) secs
end
if <(item) = [3]> then
say [maybe] for (2) secs
end
if <(item) = [4]> then
say [probably] for (2) secs
end
if <(item) = [5]> then
say [probably not]
end
Last edited by Turbo-Code1000 (Nov. 26, 2024 16:10:40)
- Discussion Forums
- » Project Ideas
-
» Making a Magic 8 ball