Wiki

Clone wiki

Core / kidsgrow

To keep Spritey from speaking too much, I took out all the prints except for "Look at me go!"

-- 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)
end

When we click "Planet Cute:Character Boy" we see two numbers below.

101 X 171

We can put these numbers right here:

sprite("Planet Cute:Character Boy",spx,spy,101,171)

When we play, Spritey is the same size.

We can make Spritey grow twice as big by multiplying those number by 2 like this:

sprite("Planet Cute:Character Boy",spx,spy,101*2,171*2)

Now Spritey is BIG!

We can make Spritey half his normal size by dividing by 2 like this:

sprite("Planet Cute:Character Boy",spx,spy,101/2,171/2)

Now Spritey is small.

What would Spritey look like as a Zombie?

Updated