Calling part_type_destroy() on a type used by a particle system asset destroys the particle type. Particle systems created from that asset no longer draw the particles of that type.
The following code attempts to destroy the particle type used by a particle system asset:
/// Create Event
var _info = particle_get_info(ps_test);
var _em = _info.emitters[0];
var _ind = _em.parttype.ind;
show_debug_message($"Particle Type ID: {_ind}");
part_type_destroy(_ind); // Attempt to destroy the particle type used by the asset
ps = part_system_create(ps_test);
The particle system draws correctly if the part_type_destroy(_ind); line is commented out.
Description
Calling
part_type_destroy()
on a type used by a particle system asset destroys the particle type. Particle systems created from that asset no longer draw the particles of that type.The following code attempts to destroy the particle type used by a particle system asset:
The particle system draws correctly if the
part_type_destroy(_ind);
line is commented out.Code example in this sample project: test_ps_asset.zip
Expected Change
Particle types used by assets cannot be destroyed, an error could be thrown when attempting to do this
Steps To Reproduce
part_type_destroy(_ind);
and run the project again => the particle system is drawn correctlyHow reliably can you recreate this issue using your steps above?
Always
Which version of GameMaker are you reporting this issue for?
2024.8.1 (Monthly)
Which platform(s) are you seeing the problem on?
Windows
Sample Package Attached?
Sample Project Added?