【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:

Top 3 UX Design Articles of 2024 to Remember

Based on most subscriptions ͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­...

Contact Form

Name

Email *

Message *