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

Renowned Water Expert Reynold Aquino Offers Exclusive Water Softener Discounts

Los Angeles, California - November 21, 2024 - World-renowned water expert Reynold Aquino is excited to announce exclusive discounts on prem...

Contact Form

Name

Email *

Message *