• 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!

Particle system broke? don't know why.

Tyeishing

Member
Title says it all, no particles will display to the screen anymore. I just switched computers, and I can't seem to get any type of particle on this one. Older exes of the game work fine though. Here's the code, any help would be appriciated.

gml_pragma("global","init()");

#region

var _p = part_type_create();

part_type_shape(_p, pt_shape_square);
part_type_life(_p, 8, 10);

part_type_alpha3(_p,0,1,0)
part_type_color3(_p,c_yellow,c_red, c_white);
part_type_size(_p,0.01,0.02,0,0.05)

part_type_speed(_p,1,1,0,0)
part_type_direction(_p,0,360,0,0);
part_type_gravity(_p,0.02,270);

global.ptBasic= _p;

#endregion




global.partSystem=part_system_create();
part_system_layer(global.partSystem, "U");










part_particles_create(global.partSystem,x+lengthdir_x(10, image_angle), y+lengthdir_y(10, image_angle),global.ptBasic,1)
 

Tyeishing

Member
I copied your code into an empty project and it works for me. What happens for you?
Hi, I figured out what the issue was. Very weird bug honestly. Going to copy and paste the solution from another user, for other's benefit.

"
Hello again. I found a solution for myself! I will explain what I discovered. Hopefully it will fix particles for you as well.

All the difference came down to whether or not the project was created while Game Maker was run in administrator mode. If I made a new project, imported a project, or created a project from a different project using "Save As" in administrator mode, the particles worked. If I created a new project while not running in administrator mode, the particles did not work (regardless of whether I entered the project in administrator mode in the future). When I switched over to my new PC, my files synced from my old computer to my new computer, and all of the particles stopped working. However, I realized that I can open GMS2 in administrator mode, launch my projects, select "Save As" to create new projects, and the particles worked again. The particles will continue to work whether or not I run in administrator mode from that point forward.

Try it. Hopefully that will resolve your issue like it did for me.
"
 
it doesn't work for me, the compiler still say that

ERROR in
action number 1
of Create Event
for object <undefined>:

Variable <unknown_object>.init(100025, -2147483648) not set before reading it.
at gml_GlobalScript_0 (line 1) - init()


i guess it's a issue due to the gml_pragma...
also there is absolutly nothing called "gml_GlobalScript_0" in my project
and the compiler talk about a script called "script2" idk why
 

Tyeishing

Member
it doesn't work for me, the compiler still say that

ERROR in
action number 1
of Create Event
for object <undefined>:

Variable <unknown_object>.init(100025, -2147483648) not set before reading it.
at gml_GlobalScript_0 (line 1) - init()


i guess it's a issue due to the gml_pragma...
also there is absolutly nothing called "gml_GlobalScript_0" in my project
and the compiler talk about a script called "script2" idk why

It might be an issue with your graphics card as well, try using integrated graphics for a moment
 
Top