HTML5 particle issues

O

oliverr

Guest
Hi,

Does anyone know why this works perfectly for desktop but not for HTML?
Doesn't thrown any errors, just not visible.
---------------------------------------------------------------------------------------------------------------------
//Rain System
global.partRain_sys = part_system_create();

//Rain Particle
global.partRain = part_type_create();
part_type_sprite(global.partRain , spr_Coins, 1, 0, 0);
part_type_size(global.partRain,0.1,0.2,0,0);
part_type_color2(global.partRain,c_teal, c_white);
part_type_alpha2(global.partRain,.5,.1);
part_type_gravity(global.partRain,0.5,290);
part_type_speed(global.partRain,2.8,2.8,0,0);
part_type_direction(global.partRain,250,330,0,1);
part_type_orientation(global.partRain,290,290,0,0,0);
part_type_life(global.partRain,20,180);

//Create Emitter
global.partRain_emit = part_emitter_create(global.partRain_sys);
part_emitter_region(global.partRain_sys,global.partRain_emit,view_xview[0]-400,view_wview[0],view_yview[0]-100, view_yview[0]-100,ps_shape_line,ps_distr_linear);
part_emitter_stream(global.partRain_sys,global.partRain_emit,global.partRain,30);

---------------------------------------------------------------------------------------------------------------------

Thanks!
 

chmod777

Member
Hi,

I've tried your code and it works as expected in GMS1 (requires WebGL to be enabled though, otherwise it's very slow) but as you said nothing is visible in GMS2.
So that's a(nother) bug.
 
O

oliverr

Guest
Weirdly, if I put the particle system between
if(keyboard_check_pressed(vk_space)){}
....and then click around 20 times, the particles start
Very strange!!!
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Have you checked the option "Use built in particles" in the HTML5 Game Options? If you do not, then the particles will not be drawn unless you set their sprite to be a sprite resource.
 
O

oliverr

Guest
Yes, this is checked by default. I will keep digging to see how to get it working.
 
Top