|
Post by Duckhead on Mar 31, 2017 10:05:07 GMT
So in my Lost Game event I would like to move the player to a "special" room. It's on the map, so I thought a simple "LET SCREEN=3" would do the trick. But when tested the game just quits to the editor after losing all lives... Is there something I'm missing? Is it even possible to move to an arbitrary room on your map?
|
|
|
Post by alessandro on Mar 31, 2017 12:51:01 GMT
Yes it is. Let's suppose that in a certain screen, e.g. 4, the player sprite hits a CUSTOM block, bringing it immediately to another screen, e.g. 7.
Syntax - in the Sprite type 0 event - would be as follows:
IF CUSTOM IF SCREEN = 4 LET SCREEN 7 RESTART ENDIF ENDIF This way you are able to set the behavior of CUSTOM blocks for each screen just by adding other IF ... ENDIF cycles within the IF CUSTOM ... ENDIF one.
You can also substitute the CUSTOM blocks with DEADLY ones (they won't kill the player on contact unless you set them to do so) or even with a certain sprite type (and image).
|
|
|
Post by Duckhead on Mar 31, 2017 13:03:26 GMT
Yes it is. Let's suppose that in a certain screen, e.g. 4, the player sprite hits a CUSTOM block, bringing it immediately to another screen, e.g. 7. Syntax - in the Sprite type 0 event - would be as follows: IF CUSTOM IF SCREEN = 4 LET SCREEN 7 RESTART ENDIF ENDIF This way you are able to set the behavior of CUSTOM blocks for each screen just by adding other IF ... ENDIF cycles within the IF CUSTOM ... ENDIF one. You can also substitute the CUSTOM blocks with DEADLY ones (they won't kill the player on contact unless you set them to do so) or even with a certain sprite type (and image). Hey Alessandro, thanks for the help! I've solved the problem by: - using a variable to keep track of lives (instead of the AGD LIVES variable) - decrease that variable in the KILL PLAYER event - in the SPRITE TYPE 0 event, move to the "end room" when the variable reaches 0 That way you never end up in the GAME LOST event
|
|