1

I've coded this statement so when 'button A' is pressed the sprite rises 10 pixels. However I want to then bring the sprite down after 0.5 seconds. What I've tried means the man no longer jumps at all, could I have some suggestions on what to do?

if(pad.A_pressed() == true) {
    y -= 10;
    lcd.drawSprite(x,y,row,col,(int *)object);
    lcd.clear();
    wait_ms(500);
    y += 10;
    lcd.drawSprite(x,y,row,col,(int *)object);
    lcd.clear();    
jim
  • 27
  • 2
  • 1
    Please include the code as text pasted into your question in a code block. (the easiest way to create a code block is to indent your code with four spaces when pasting it, or to put `\`\`\`` above and below your code) – nanofarad May 03 '20 at 20:57
  • 1
    edited so the code is within the text – jim May 03 '20 at 21:07

0 Answers0