ok here is what i want to do
when i destroy an asteroid
i want it to spawn 1 to 5 minerals
if you can send me a capx
On Asteroid Destroyed
Repeat ceil(random(5)) times - Spawn Minerals
Develop games in your browser. Powerful, performant & highly capable.
where is that repeat ceil
ceil(random(5)) is the expression for how many times to repeat. Ceil() rounds up.
ok found it but now the problem is they are all stacked XD
is there a way to not have them stacked ?
How do you want them to spawn then? You can position them however you want after creating them.
One way is to move at angle, for example 20 pixels at random(360) degrees.
ty so much it make it look much better