Tanada Logo
Scratch Game Instructions for Frank Eats Tacos

Scratch Game Instructions for Frank Eats Tacos

  1. Step 1: Set Up the Player Sprite (10 minutes)

    Let"s pick a character to move around. Click "Choose a Sprite" (bottom left) and pick one you like—maybe a kid, animal (Frank, set size to 70).

    Click your sprite in the list, then go to the blocks area on the left.

    Find the yellow Events blocks. Drag this block to the middle: "when green flag clicked".

    Now, add controls so it moves with arrow keys. Find the orange Control blocks and drag "forever". Snap it under the "when green flag clicked".

    Inside the "forever", add orange control "if...then" and blue Sensing and Motion blocks. There will be 4 separate "if...then" statements inside the "forever" loop:

    Drag Control "if", Sensing "key up arrow pressed", "then" (from orange Control), then snap Motion "change y by 5" inside it.

    Drag Control "if", Sensing "key down arrow pressed", "then", then snap Motion "change y by -5" inside it.

    Drag Control "if", Sensing "key right arrow pressed", "then", then snap Motion "change x by 5" inside it.

    Drag Control "if", Sensing "key left arrow pressed", "then", then snap Motion "change x by -5" inside it.

    Click the green flag (top of stage) to test it. Can you move your sprite with arrow keys? Awesome!

  2. Step 2: Add the Treasure (Taco) Sprite (15 minutes)

    Now let"s make treasures to collect. Click "Choose a Sprite" again and pick something cool—like a coin, star, or gem. (Taco, set size to 50)

    Click the treasure sprite in the list. Add these blocks:

    Drag a yellow "when green flag clicked" block.

    Snap an orange "forever" block under it.

    Inside the "forever", snap these: Blue Motion: "go to random position". Orange Control: "wait 2 seconds".

    Now, let"s make it give points when touched. Add another yellow "when green flag clicked" block.

    Under it, snap an orange "forever" block.

    Inside the forever block:

    Orange Control: "if touching [your player sprite] then" (pick your sprite"s name from the dropdown).

    Click Dark Orange Variables, Make Variable, New variable name: type "Score", keep For all sprites checked, Ok.

    Drag Dark Orange "set my variable to 0" to under the when green flag clicked and change the variable to Score, so it says "set Score to 0".

    Set the "if", touching "Frank"(your sprite name) then add Dark Orange "change (my variable=Score) by 1".

    Inside the "if", snap purple Looks: "hide". Still inside the "if", snap blue Motion: "go to random position".

    Below the "if" (but inside "forever"), snap purple Looks: "show".

    Test it! Click the green flag. Move your sprite to touch the treasure—does it disappear and reappear somewhere else? Check if the "Score" box (top left) goes up!

  3. Step 3: Add the Enemy Sprite (Parrot) (10 minutes)

    Time for a tricky enemy! Click "Choose a Sprite" and pick something sneaky—like a monster or ghost. (Parrot, set size to 20)

    Click the enemy sprite. Add these blocks:

    Drag a yellow "when green flag clicked" block.

    Snap an orange "forever" block under it.

    Inside the "forever", snap blue Motion: "move 10 steps" and "if on edge, bounce".

    Now, make it take points away. Add another yellow "when green flag clicked" block.

    Snap an orange "forever" block under it.

    Inside that, snap:

    Orange Control: "if touching [your player sprite] then".

    Inside the "if", snap red Variables: "change score by -2".

    then add Looks, hide. then go to random position. then below the if/then segment add Looks, show.

    Test it! Does the enemy move around? If it touches your sprite, does the score go down? Cool!

  4. Step 4: Add a Timer (10 minutes)

    Let"s make the game stop after 60 seconds. Click the player sprite (Frank) again.

    Add a new dark orange Variables block: Click "Make a Variable," name it "Timer," and click OK.

    Drag a yellow "when green flag clicked" block.

    Snap these under it:

    dark orange Variables: "set Timer to 60".

    Orange Control: "repeat until' then drag green operator and set Timer = 0" (use green Operators "=" block to set "Timer" and "0").

    Inside the "repeat", snap red Variables: "change Timer by -1". Also inside, snap orange Control: "wait 1 seconds".

    Below the "repeat", snap orange Control: "stop all".

    Test it! Click the green flag. Does the "Timer" count down from 60, and does the game stop at 0? You"re a coding star!

  5. Step 5: Play and Compete! (5 minutes)

    Click the green flag and play your game! Collect treasures, dodge the enemy, and see how high your score gets in 60 seconds.

    Tell a friend your score—can they beat it? Try again to beat your own score!