Quick answer: Particle systems use room coordinates. Pass x/y directly when spawning at an instance. For GUI/HUD particles, draw the system in Draw GUI events with GUI coords.
Spawn particles at the player. They appear in the corner. The coords passed were screen-relative (e.g. device_mouse_x_to_gui) instead of room.
The Symptom
Particles emit at unexpected position. Usually at room (0,0) or in a fixed corner of the screen.
The Fix
/// In obj_player Step
part_emitter_burst(part_sys, part_emitter, ps_shape_rectangle, x - 8, y - 8, x + 8, y + 8, part_type, 5);
x and y here are the instance’s room coordinates. The emitter region uses room coords too. Particles spawn around the player.
HUD Particles
/// In obj_hud Draw GUI event
part_system_position(hud_sys, 0, 0);
part_system_drawit(hud_sys);
System drawn during Draw GUI uses GUI coordinates. Useful for menus, screen-edge effects.
Verifying
Spawn at player position. Particles appear at player. Move camera; particles still emit at the world position the player occupies.
“Room coords for world. GUI coords for HUD. Don’t mix.”
Related Issues
For asset precache, see precache. For surface lost, see surface lost.
Right space. Particles spawn where intended.