Wiki

Clone wiki

Core / kidtint

After we shrank Spritey our code looked like this:

-- Use this function to perform your initial setup
function setup()
    spx = 100 -- Spritey x
    spy = 100 -- Spritey y
    print("Hello World!")
    print("Look at me go!")
end

-- This function gets called once every frame
function draw()
    -- This sets the background color to black
    background(0, 0, 0)
    -- Do your drawing here
    sprite("SpaceCute:Background",374,374)
    spx = spx + 1
    spy = spy + 1
    sprite("Planet Cute:Character Boy",spx,spy,101/2,171/2)
end

Now we want to turn Spritey into a Zombie.

Put in

spy = spy + 1
tint(0,255,0,255)
sprite("Planet Cute:Character Boy",spx,spy,101/2,171/2)

When we play, Spritey is green!

That could be alien Spritey or Spritey after too much candy.

If you look at your code the (0,255,0,255) is shaded yellow.

If you touch it, the color wheel comes up.

You pick the colors and it will change the numbers for you.

CONGRADULATIONS! You have leveled up!

We continue the adventures of Spritey by keeping a closer watch on him

Updated