V
Vredniuka
Guest
Hi guys. I'm having a strange issue, probably result of me not having much experience with particle systems. According to the help, I should be able to have as many particle emitters or systems as I'd like. But I can't seem to get more than one working. For a quick test file, I created 3, and only the first that was created ever showing up in the game. If I turn off the first one in the layers, then the 2nd one shows up when I run the game. And if I turn off the 2nd one as well, the 3rd one shows up.
Here are some images and code illustrating my problem.
Here, all 3 partcile systems and emitters are on, but only the 1st one shows up.
Here I turned off the 1st one, and only 2nd shows up.
And the code I put in the object's Create event
for 2nd particle system. Pretty much the same thing, just some different variable names and no gravity.
3rd particles system is just a duplicate of 1st one with changed variable names.
Here are some images and code illustrating my problem.
Here, all 3 partcile systems and emitters are on, but only the 1st one shows up.
Here I turned off the 1st one, and only 2nd shows up.
And the code I put in the object's Create event
Code:
/// @description create PartSys01 particles
//get direction
//Create particle system (this is 1st system)
PartSys01 = part_system_create();
part_system_depth(PartSys01,-100);
//Create a PartSys01 particle
bloodsplat = part_type_create()
part_type_shape (bloodsplat,pt_shape_smoke);
part_type_size(bloodsplat, 0.07, 0.15, 0, 0);
part_type_speed(bloodsplat, 4 , 7 , 0, 0);
//part_type_direction(bloodsplat, dir1, dir2, 0, 0);
part_type_gravity(bloodsplat, 0.3 , 270);
part_type_life(bloodsplat, room_speed * 0.3, room_speed * 0.5);
part_type_colour1(bloodsplat, c_red);
//create blood emitter
blood_emitter = part_emitter_create(PartSys01);
part_emitter_region(blood_emitter, PartSys01, x-5, x+5, y-5, y+5, ps_shape_ellipse, ps_distr_linear);
//part_emitter_burst(blood_emitter, PartSys01, bloodsplat, 30);
part_emitter_stream(blood_emitter, PartSys01, bloodsplat, 5);
Code:
//Create particle system 2
steam = part_system_create();
part_system_depth(steam,0);
//Create a steam particle
pipesteam = part_type_create()
part_type_shape (pipesteam,pt_shape_smoke);
part_type_size(pipesteam, 0.1, 0.5, 0.01, 0);
part_type_alpha2(pipesteam, 1, 0);
part_type_speed(pipesteam, 4, 7, 0, 0);
part_type_direction(pipesteam, 90, 90, 0, 0);
//part_type_gravity(pipesteam, 0.3, 270);
part_type_life(pipesteam, room_speed * 0.3, room_speed * 0.5);
part_type_colour1(pipesteam, c_blue);
//create steam emitter
steam_emitter = part_emitter_create(steam);
part_emitter_region(steam_emitter, steam, x-5, x+5, y-5, y+5, ps_shape_ellipse, ps_distr_linear);
//part_emitter_burst(steam_emitter, steam, pipesteam, 30);
part_emitter_stream(steam_emitter, steam, pipesteam, 3);