Hi there everyone! I'm working on a game for my English class, but I've run into a bit of a snag.
I want the background to change to a different one when a sprite (the player) touches another sprite (the door). How could I do this?
Offline
Hi jarnww,
this is a classic situation in which broadcasting a message by the door-sprite and letting the stage react to receiving that message by switching to another background should do the trick:
door-sprite:
[blocks]
<when green flag clicked>
<forever if><touching[ player
<broadcast[ openDoor
<end>
[/blocks]
stage:
[blocks]
<when I receive[ openDoor
<next costume>
[/blocks]
Does that help?
Offline