GML PowerUp obtaining with a nice scaling effect

E

E4gy

Guest
How can I program a fluid disappearing-effect on the PowerUp when the player hits it?
i tried this method, but the powerup sprite only scales when the player is ON it:

if (place_meeting(x,y,oPlayer))
{
image_xscale-=0.03;
image_yscale-=0.03;
if (image_xscale <= 0) && (image_yscale <= 0)
{
instance_destroy();
}
}

 

sp202

Member
Set a variable to true when the player touches it and then scale down when that variable is true.
 
Top