Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

how to get sprite to move when you drag screen

edited February 2013 in Questions Posts: 37

I AM VERY NEW TO LUA AND NEED HELP ASAP
so for example if you move your finger left across the screen the sprite will follow your finger and when you release your finger it
stops moving oh and it starts when your finger is on the screen

Tagged:

Comments

  • edited February 2013 Posts: 196

    hi again,

    function setup()
        -- look at the Codea examples ^^
        img = readImage("Planet Cute:Character Boy")
    end
    
    function draw()
        background(0)
        sprite(img, CurrentTouch.x, CurrentTouch.y)
    end
    

    cheers

Sign In or Register to comment.