【GameMaker】 Create a particle trail when an object moves

Information about object: obj_player
Sprite: spr_player
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object

Step Event:
execute code:

//Update to mouse position
x=mouse_x;
y=mouse_y;
//Create a particle object
part = instance_create(x,y,obj_particle);
part.vspeed = 1;
part.gravity = 0.1;
part.delta = 0.1;

Information about object: obj_particle
Sprite: spr_par Solid: false Visible: true Depth: 0 Persistent: false Parent: Children: Mask:
No Physics Object
Step Event:
execute code:

// Fadeout:
image_alpha -= delta;
if image_alpha <= 0 instance_destroy();//destroy if invisible

No comments:

This will make you a better decision maker | Annie Duke (author of “Thinking in Bets” and “Quit”, former pro poker…

Annie is a former professional poker player, decision-making expert, author, and special partner at First Round Capital.  ͏     ­͏     ­͏   ...

Contact Form

Name

Email *

Message *