Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

arrow_back Coder une conclusion

Transcript

In this add-on, you’ll add final slides to your RPG that will appear after the user finds the hidden object. This video will show you how to get started. Then, it will be up to you to use what you’ve learned so far to complete the code.

First, select the “narrative” sprite, and add more costumes. Duplicate the opening slides and change the text, or paint new ones from scratch. Add some text to end your RPG.

Then, return to the scripts tab. Add some code to make the sprite show, go to front, then cycle through the costumes you just created. Click this stack to make sure it works. Great!

Make this code stack run when the game ends. Place a “when I receive” block on top, and name the message “game over.” To make the stack run, place a “broadcast” block at the place in the code when the game ends. The game ends when the sprite touches the object. Find the place in the code where this happens, and place the “broadcast” block there. If you added a “say” block earlier to tell the user that they won, remove it now so it doesn’t play over the final slides. Now, it’s your turn!

Add some closing slides to end your RPG. Program the “Narrative” sprite to cycle through the ending slides. Use “broadcast” blocks to make the code run when the character finds the object.

Choisir une extension
Réagencer les meubles
Personnalise l'apparence de chaque lieu.
Coucou
Augmente la difficulté du jeu en montrant l'objet uniquement si le personnage est à proximité.
Coder une conclusion
Ajoute des diapositives pour terminer l'histoire lorsque le joueur gagne.
Objets musicaux
Ajoute des éléments interactifs qui jouent un son lorsque le personnage marche dessus.
Obstruction par obstacle
Rends les cartes plus réalistes en empêchant le personnage de rentrer dans les obstacles tels que les arbres ou les bâtiments.
Cache-cache
Cache l'objet dans un lieu aléatoire à chaque fois.
arrow_backward Retour
Suivant arrow_forward