• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 Port from Test to HTML5 Results in Unsolvable Particle Problem

S

Sabo

Guest
In every room the player is created with it's own particle system.
In the test version particles are always visible in each room.
But when I run as HTML5, the particles are only visible in the starting room.
When I change room they are no longer visible.
When I debug, they still seem to be existing tough.

I am new to Game Maker, have no clue why this is happening :(
 
S

Sabo

Guest
Very well..

I have a particle object, and a player object which creates the particle object. The particles function as a particle trail. Upon room switch the player is destroyed.

PARTICLE
--Create

//Particle System
ptcl_sys = part_system_create();
part_system_depth(ptcl_sys, layer_get_depth("Particles"));


//Particle
ptcl = part_type_create();
ptclsize = 5;
part_type_shape(0, pt_shape_square);
part_type_color1(ptcl, c_yellow);
part_type_alpha2(ptcl, 1 , 0);
part_type_life(ptcl, 5, 10);

//Particle Emitter
ptcl_emit = part_emitter_create(ptcl_sys);
part_emitter_stream(ptcl_sys, ptcl_emit, ptcl, 1);
regionSize = 1;
--Step
part_type_size(ptcl, ptclsize * 0.01, ptclsize*2 * 0.01, 0 , 0);

part_emitter_region(
ptcl_sys,
ptcl_emit,
x - regionSize, x + regionSize, y - regionSize, y + regionSize,
1,
0);

show_debug_message("Exists: " + string(part_type_exists(ptcl)));

--Destroy
part_type_destroy(ptcl);
part_emitter_destroy(ptcl_sys, ptcl_emit);
part_system_destroy(ptcl_sys);

PLAYER

--Create
ptcltrail = instance_create_layer(x, y, "Particles", obj_ptcl);



--Step
ptcltrail.x = x;
ptcltrail.y = y;
ptcltrail.ptclsize = sprite_width * 0.6;



--Destroy
instance_destroy(ptcltrail);


Thanks in advance,

-- Sabo
 
Top