Howdy, Stranger!

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

Moving Sprites

pacpac
in General Posts: 208

I can’t see to move the sprite with out making looks of copies of it in the directions that I move it

If any one can make this not happen please put a comment

Tagged:

Comments

  • Posts: 1,225
    @pac - please post an example of your code so we can see how you are approaching this.
  • dave1707dave1707 Mod
    edited July 2018 Posts: 7,602

    @pac Sounds like you don’t have background(0) right after the function draw() line.

    function setup()
        x,y=50,50
        xv,yv=3,5
    end
    
    function draw()
        background(0)
        sprite("Planet Cute:Character Horn Girl",x,y)
        x=x+xv
        y=y+yv
        if x>WIDTH or x<0 then
            xv=xv*-1
        end
        if y>HEIGHT or y<0 then
            yv=yv*-1
        end
    end
    
  • pacpac
    Posts: 208

    Thank you Dave it worked you are wonderful I will come back if I have more questions.. thank you

  • dave1707dave1707 Mod
    Posts: 7,602

    @pac If you have questions, that’s what everyone is here for. The experienced programmers help the one that are new to programming. One suggestion, look thru the forum for examples. By running them and looking at the code will help you to learn.

  • pacpac
    Posts: 208

    Do you now how to scale the screen?

  • dave1707dave1707 Mod
    Posts: 7,602

    If you ask a question in one discussion, don’t start another discussion for the same question. This forum isn’t monitored constantly, so when you ask a question give some time for someone to see it and answer it.

  • pacpac
    Posts: 208

    Okay

Sign In or Register to comment.