Discuss Scratch

BridgeCreek
Scratcher
55 posts

Explosions

I'm trying to make it so if you touch a bomb, it triggers an explosion. This is the code for the bomb:
when green flag clicked
forever
if <<[lever] = [7]> and <touching [player] ?>> then
broadcast [bang]
end
end
And this is the code for the explosion:
when I receive [bang]
repeat (5)
wait (1) secs
next costume
end
I don't know what's wrong with this code, but nothing happens when you touch the bomb. Please help!
MathPuppy314
Scratcher
500+ posts

Explosions

I'm not sure with the forum blocks, but you would need to use a variable for lever(did you mean level?).

Last edited by MathPuppy314 (Aug. 5, 2020 21:32:21)

BridgeCreek
Scratcher
55 posts

Explosions

I am using a variable, I just didn't see that there was a forum block for variables. Thanks though!
MathPuppy314
Scratcher
500+ posts

Explosions

It might possibly be that the explosion sprite is hidden?

Powered by DjangoBB