From Test-Scratch-Wiki
![]() |
This article or section may not have content matching Scratch Wiki editing standards. Please improve it according to Scratch Wiki:Guidelines. Reason: please look at other tutorials to get a sense of how a tutorial looks |
![]() |
This article is a stub. It may be broken, incomplete, unfinished, or have missing parts/sections. If you can help expand this article, please help! There might be suggestions on its talk page. |
RPGs (role-playing games) generally feature a single or multiple playable characters who are guided on a quest through a world full of enemies. They usually are played from a top-down perspective.
In this tutorial, you will learn how to make a top-down RPG.
Movement
Movement is one of the most basic scripts in an RPG. This script will control the player with the arrow keys, and stop when the player hits a black wall.
When gf clicked go to x: (0) y: (0) Forever if <key [up arrow v] pressed?> then Change y by (7) If <touching color [#000000]?> Change y by (-7) end end if <key [down arrow v] pressed?> then Change y by (-7) If <touching color [#000000]?> Change y by (7) end end if <key [left arrow v] pressed?> then Change x by (-7) If <touching color [#000000]?> Change y by (7) end end if <key [right arrow v] pressed?> then Change y by (7) If <touching color [#000000]?> Change y by (-7) end end