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();