Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

136
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda