Another related question! So I just finished making a cute little butterfly to add to the scenery of my level, and I would like him to spawn with a random X and Y value and flutter left and right randomly… this is the code I have in his update function, currently what happens is he like spazzes out to the left then right on off on off non stop… lol Any thoughts?
if (FP.rand(2) > 0)
{
x -= power;
sprButterfly.play("fly");
}
else
{
x += power;
sprButterfly.play("fly_right");
}