This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-10-22 04:45:46

Votebox
New Scratcher
Registered: 2012-10-22
Posts: 1

College Scratch Project

Hello

I need help in getting my college scratch project, first of all its a 2D platformer and is simple like the original mario, but i want to add a twist and make it so when the player is a black he can walk on black platforms and when he is white he can walk on white platforms how to i do this exaclty?

Offline

 

#2 2012-10-22 09:24:42

Zangooser
Scratcher
Registered: 2012-03-18
Posts: 1000+

Re: College Scratch Project

Make a variable and call it something that you'll remember, like "Mario Color". Make a single sprite for Mario, and make sure it has the following three costumes: a normal Mario, a white-colored Mario, and a black-colored Mario. Put the regular costume first, the white costume second, and the black costume third. Rename the first costume "NormalSprite", the second "WhiteSprite", and the third "BlackSprite". (Or whatever names you want, it doesn't matter)
Then make a few scripts like this:

when gf clicked
forever
if <(Mario Color) = [1]>
switch to costume [NormalSprite v]
end
if <(Mario Color) = [2]>
switch to costume [WhiteSprite v]
end
if <(Mario Color) = [3]>
switch to costume [BlackSprite v]
end

when gf clicked
set [Mario Color v] to [1]
when key [space v] pressed //whatever key you want. It could be a broadcast
set [Mario Color v] to [#] //Remember: 1=Regular, 2=White, 3=Black
Does this make sense? I will explain further if needed.  smile

Last edited by Zangooser (2012-10-22 09:26:18)


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/O0efo.png&amp;link2=http://i.imgur.com/B1KzK.png

Offline

 

Board footer