Legacy GM How to change opacity on particles?

H

HenrikoNumberOne

Guest
Hello! I've been trying to make my own particle system in Game Maker, and everything has been working smoothly until now. For some reason, I can't seem to be able to change the opacity of the particles that are emitted! I've tried adding this line to the particle object's create event;

Code:
part_type_alpha2(partBlood,0.8,0.2);
... but that didn't work - the particles are still slightly transparent and not "super-saturated and opaque" as I want them!

Any help would be very much appreciated.

- Henriko

Here is the entire code for the particle system in case you want to read it;

Code:
///Blood system
partBlood_sys = part_system_create();

//Blood Particle
partBlood = part_type_create();
part_type_shape(partBlood,pt_shape_disk);
part_type_size(partBlood,0.10,0.30,-0.01,0);
part_type_colour1(partBlood,255);
part_type_alpha2(partBlood,0.8,0.2);
part_type_speed(partBlood,1,3,0,0);
part_type_direction(partBlood,0,359,0,0);
part_type_gravity(partBlood,0.3,270);
part_type_blend(partBlood,1);
part_type_life(partBlood,20,40);

//Create Emitter
partBlood_emit = part_emitter_create(partBlood_sys);
 

samspade

Member
Hello! I've been trying to make my own particle system in Game Maker, and everything has been working smoothly until now. For some reason, I can't seem to be able to change the opacity of the particles that are emitted! I've tried adding this line to the particle object's create event;

Code:
part_type_alpha2(partBlood,0.8,0.2);
... but that didn't work - the particles are still slightly transparent and not "super-saturated and opaque" as I want them!

Any help would be very much appreciated.

- Henriko

Here is the entire code for the particle system in case you want to read it;

Code:
///Blood system
partBlood_sys = part_system_create();

//Blood Particle
partBlood = part_type_create();
part_type_shape(partBlood,pt_shape_disk);
part_type_size(partBlood,0.10,0.30,-0.01,0);
part_type_colour1(partBlood,255);
part_type_alpha2(partBlood,0.8,0.2);
part_type_speed(partBlood,1,3,0,0);
part_type_direction(partBlood,0,359,0,0);
part_type_gravity(partBlood,0.3,270);
part_type_blend(partBlood,1);
part_type_life(partBlood,20,40);

//Create Emitter
partBlood_emit = part_emitter_create(partBlood_sys);
I think the only way to do this is to use a sprite with the transparency you want: part_type_sprite.

http://docs.yoyogames.com/source/da...articles/particle types/part_type_sprite.html
 
Top