Apr 292019
Broadcasting messages is a useful way of passing information between sprites. An example of this is when a level finishes maybe because a character gets to the end point – sprites might need to hide/show, return to start points, background change…
In our game, a key point is when the time runs out, eg darkness comes. Lots of things need to happen at this point, eg air raid siren, planes, bombs, main sprite – no more movement…
Ideas
- Call a message “night” or “darkness”
- Desice what needs to happen when sprites/backgrounds receive this message
- Main sprite could when it receives “night”
- Bomb/plane code starts with “when I receive” instead of green flag