Many games have title screens, as well as levels in RPG 游戏. Creating these are easy because they are just backdrops drawn by the creator. 侦测类积木 can be added to the sprite as 墙壁侦测器 in order for the sprite to complete missions.
Title screens usually consist of one backdrop (the title and design) and a sprite (the "start" button). You will need three 广播 for this screen:
-TitleScreen -StartGame -ShowSButton
The backdrop should contain this script:
當收到訊息 [TitleScreen v] 背景換成 [Title Screen v] 廣播訊息 [ShowSButton v]
The sprite should contain these scripts:
當 @greenflag 被點擊 顯示 重複無限次 如果 <碰到 [滑鼠游標 v] ?> 那麼 造型換成 [造型2 v] // A different colored costume 造型換成 [造型1 v] // The original costume end end
當角色被點擊 廣播訊息 [StartGame v] 隱藏
當收到訊息 [TitleScreen v] 顯示 // This script is in case of a "Play Again" button at the end of the game. If you do not have a "play again" button, this script is not necessary
Levels are backdrops. Be sure to keep platform color consistent in 游戏平台, as well as anything that may cause the player to lose a life.
If you wish, you can add a large readout 变量 that has this script somewhere in your project:
當 @greenflag 被點擊 重複無限次 變數 [Level Name v] 設為 (背景名稱) end
However, this requires each backdrop to be named. This is a very simple way of creating the backdrop levels and title screen.
Here's a simple script to put in the player so you can advance to the next level without scrolling or anything fancy.
當 @greenflag 被點擊 重複無限次 如果 (([x座標 v] of [Player v]) > (240)) 那麼 背景換成 [下一个背景 v] 定位到 x: (-202) y: (-70) end end