Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!