Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
How to get rid of a sprite but so I can add it again later

I need to make it so the rocket flies which I want to achive by killing the sprite subtracting a y cordinate and drawing the sprite and doing that over and over again so this way I get an illusion of it flying up.

background(rgb(49,0,71));

var sn = 0; 


while ((sn <= 100)) {
  var star = createSprite(200, 200);
  star.y = randomNumber(0,400);
  star.x = randomNumber(0,400);
  star.setAnimation("star");
  
  star.scale = 0.09;
  
  drawSprites();
  sn = sn + 1;
}

var rocket1 = createSprite(randomNumber(0,400), 400);
rocket1.setAnimation("rocket1");
rocket1.rotation = 270;
rocket1.scale = 0.2;

**function rocket1m() {
  rocket1.destroy();
  rocket1.y = rocket1.y - 1;
  drawSprites();
}**
rocket1m();
drawSprites();
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda