Viciousse
Member
Hi Everyone,
This will be my first post in this community;
I am working in a "BreakOut" game as first project to get familar with GMS 2, and i want to add a trail effect to the my object "obj_ball" with the following methode:
I created the "obj_ball" and "obj_trail" with the code bellow:
obj_trail:
Create Event
Step Event
obj_ball:
Step Event
The issue i am facing it that the trail color is opaque, and the sprite showed in the trail effect is the ball "obj_ball"
Any advice to fix this will be much apreciated
This will be my first post in this community;
I am working in a "BreakOut" game as first project to get familar with GMS 2, and i want to add a trail effect to the my object "obj_ball" with the following methode:
I created the "obj_ball" and "obj_trail" with the code bellow:
obj_trail:
Create Event
GML:
image_speed = 0;
image_index = 1;
GML:
if image_xscale > .1 {
image_alpha -= .01;
image_xscale -= .03;
image_yscale -= .03;
} else {
instance_destroy();
}
Step Event
GML:
if (go == true){
trail = instance_create_layer(x,y,"instances",obj_trail);
trail.sprite_index = sprite_index;
trail.image_speed = 0;
trail.image_index = 1;
//La ball change d'angle suivant la direction ou elle vas
image_angle=direction;
image_xscale=1;
image_yscale=1;
}
else{
x = obj_plateforme.x;
}
Any advice to fix this will be much apreciated
Last edited: