W
Wild_West
Guest
Everytime I have more than one object in a room that uses particle systems one seems to stop the other from making any at all and I don't know why. It's like only 1 of the systems can exist at a time or something.
well if I didn't I wouldn't be asking about this. Is having more than 1 the issue?Do you need more than one particle system?
well the particle scripts all work fine, like I said it's just when there's more than 1 object making particles in the room, 1 seems to cancel the other. Since I can only see 1 and all any of these objects do is MAKE the particles.Without seeing code we can't really help. At a guess I'd suggest you're creating an object for a particle then just recreating it rather than creating a new instance of it.
Fine here's the code for both objects making particles, you look it over and tell me why it's only showing 1 system's particles at a time when both are in one room if you're so clever.It's your code.
You're probably doing something wrong in it.
Information about object: lan_blast_sphere
Sprite: wall_spr
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
execute code:
lan_system = part_system_create();
part_system_depth(lan_system, -1009);
sphere_type = part_type_create();
sphere_emitter = part_emitter_create(lan_system);
part_type_shape(sphere_type, pt_shape_spark);
part_type_size(sphere_type, .4, .8, .1, 0);
part_type_colour3(sphere_type, c_white, c_yellow, c_orange);
part_type_alpha3(sphere_type, 1, .3, .1);
part_type_life(sphere_type, 3, 6);
part_type_speed(sphere_type, 0, 10, 0, 0);
part_type_direction(sphere_type, 0, 360, 1, 0);
part_particles_create(lan_system, x,y, sphere_type, 1);
Destroy Event:
execute code:
character_west.character_can_act = true;
part_type_destroy(sphere_type);
part_emitter_clear(lan_system, sphere_emitter);
part_particles_clear(lan_system);
Step Event:
execute code:
character_west.character_can_act = false;
if( part_system_exists(lan_system) )
{
part_emitter_region(lan_system, sphere_type, x-10, x+10, y-10, y+10, ps_shape_ellipse, ps_distr_gaussian);
part_emitter_stream(lan_system, sphere_emitter, sphere_type, 30);
}
Collision Event with object wall_parent:
destroy the instance
Other Event: Outside Room:
destroy the instance
execute code:
part_type_clear(sphere_type);
Other Event: Game End:
execute code:
part_system_destroy(lan_system);
part_type_destroy(sphere_type);
part_emitter_destroy(lan_system, sphere_emitter);
Other Event: Room End:
execute code:
part_system_destroy(lan_system);
part_type_destroy(sphere_type);
part_emitter_destroy(lan_system, sphere_emitter);
Draw Event:
execute code:
///Don't Draw Self
Information about object: fortune_particle
Sprite: wall_spr
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
execute code:
fortune_system = part_system_create();
fortune_type = part_type_create();
part_type_colour3(fortune_type, c_white, c_yellow, c_orange);
part_type_alpha3(fortune_type, .1, .5, 1);
part_type_blend(fortune_type, .5);
part_type_life(fortune_type, 30, 90);
part_type_size(fortune_type, 0, .4, 0, 0);
part_type_direction(fortune_type, 0, 359, 5, 0);
part_type_speed(fortune_type, 1, 5, 0, 0);
part_type_shape(fortune_type, pt_shape_star);
part_particles_create(fortune_system, x,y, fortune_type, 1);
fortune_emitter = part_emitter_create(fortune_system);
part_emitter_region(fortune_system, fortune_emitter, x-16, x+16, y-16, y+16, ps_shape_diamond, ps_distr_invgaussian);
Step Event:
execute code:
if(part_system_exists(fortune_system) )
{ part_emitter_stream(fortune_system, fortune_emitter, fortune_type, 10); }
Other Event: Game End:
execute code:
part_system_destroy(fortune_system);
part_type_destroy(fortune_type);
part_emitter_destroy(fortune_system, fortune_emitter);
Other Event: Room End:
execute code:
part_system_destroy(fortune_system);
part_type_destroy(fortune_type);
part_emitter_destroy(fortune_system, fortune_emitter);
Draw Event:
execute code:
draw_set_alpha(.4);
draw_circle_colour(x,y,100,c_white, c_white, true);
draw_set_alpha(1);
Sounds like you're doing us plebs a big favour by asking questions properly, so I don't wanna be a bother and I decided I don't know anything about particles or game maker.Fine here's the code for both objects making particles, you look it over and tell me why it's only showing 1 system's particles at a time when both are in one room if you're so clever.
Code:Information about object: lan_blast_sphere Sprite: wall_spr Solid: false Visible: true Depth: 0 Persistent: false Parent: Children: Mask: No Physics Object Create Event: execute code: lan_system = part_system_create(); part_system_depth(lan_system, -1009); sphere_type = part_type_create(); sphere_emitter = part_emitter_create(lan_system); part_type_shape(sphere_type, pt_shape_spark); part_type_size(sphere_type, .4, .8, .1, 0); part_type_colour3(sphere_type, c_white, c_yellow, c_orange); part_type_alpha3(sphere_type, 1, .3, .1); part_type_life(sphere_type, 3, 6); part_type_speed(sphere_type, 0, 10, 0, 0); part_type_direction(sphere_type, 0, 360, 1, 0); part_particles_create(lan_system, x,y, sphere_type, 1); Destroy Event: execute code: character_west.character_can_act = true; part_type_destroy(sphere_type); part_emitter_clear(lan_system, sphere_emitter); part_particles_clear(lan_system); Step Event: execute code: character_west.character_can_act = false; if( part_system_exists(lan_system) ) { part_emitter_region(lan_system, sphere_type, x-10, x+10, y-10, y+10, ps_shape_ellipse, ps_distr_gaussian); part_emitter_stream(lan_system, sphere_emitter, sphere_type, 30); } Collision Event with object wall_parent: destroy the instance Other Event: Outside Room: destroy the instance execute code: part_type_clear(sphere_type); Other Event: Game End: execute code: part_system_destroy(lan_system); part_type_destroy(sphere_type); part_emitter_destroy(lan_system, sphere_emitter); Other Event: Room End: execute code: part_system_destroy(lan_system); part_type_destroy(sphere_type); part_emitter_destroy(lan_system, sphere_emitter); Draw Event: execute code: ///Don't Draw Self
Code:Information about object: fortune_particle Sprite: wall_spr Solid: false Visible: true Depth: 0 Persistent: false Parent: Children: Mask: No Physics Object Create Event: execute code: fortune_system = part_system_create(); fortune_type = part_type_create(); part_type_colour3(fortune_type, c_white, c_yellow, c_orange); part_type_alpha3(fortune_type, .1, .5, 1); part_type_blend(fortune_type, .5); part_type_life(fortune_type, 30, 90); part_type_size(fortune_type, 0, .4, 0, 0); part_type_direction(fortune_type, 0, 359, 5, 0); part_type_speed(fortune_type, 1, 5, 0, 0); part_type_shape(fortune_type, pt_shape_star); part_particles_create(fortune_system, x,y, fortune_type, 1); fortune_emitter = part_emitter_create(fortune_system); part_emitter_region(fortune_system, fortune_emitter, x-16, x+16, y-16, y+16, ps_shape_diamond, ps_distr_invgaussian); Step Event: execute code: if(part_system_exists(fortune_system) ) { part_emitter_stream(fortune_system, fortune_emitter, fortune_type, 10); } Other Event: Game End: execute code: part_system_destroy(fortune_system); part_type_destroy(fortune_type); part_emitter_destroy(fortune_system, fortune_emitter); Other Event: Room End: execute code: part_system_destroy(fortune_system); part_type_destroy(fortune_type); part_emitter_destroy(fortune_system, fortune_emitter); Draw Event: execute code: draw_set_alpha(.4); draw_circle_colour(x,y,100,c_white, c_white, true); draw_set_alpha(1);
That's a great wise ass answer. But pardon me for asking a question and expecting people here to do what this site exists for and actually being helpful. Or even polite as a start. I mean I'm sorry if MY response was a little flippant but hey you don't want to be nice I don't have to be either.Sounds like you're doing us plebs a big favour by asking questions properly, so I don't wanna be a bother and I decided I don't know anything about particles or game maker.
Sorry, can't help.
If your question is vague, your answers are gonna be vague.That's a great wise ass answer. But pardon me for asking a question and expecting people here to do what this site exists for and actually being helpful. Or even polite as a start. I mean I'm sorry if MY response was a little flippant but hey you don't want to be nice I don't have to be either.
Because I'll tell you something in all the time I've been part of this site never once have I found a thread that matches my situations to the letter. again I say I'm sorry if my particular problems don't fit into some generic newbie issues that get asked everyday. I mean if you know the answer is it really that much of a burden to just type out the answer? If you don't know it or can't work it out from what I say or show, just tell me that. Don't cop an attitude and say "Hey idiot just look it up" or "It's your code you're doing it wrong." I already know it's wrong that's why I'm A-S-K-I-N-G F-O-R H-E-L-P. from the people who supposedly know about these things. and what do I get instead? It's a joke.
I didn't start getting rude until they did for one thing. Now what does this mean?If your question is vague, your answers are gonna be vague.
If you start getting rude, ppl are gonna be rude as well, since it's not our job to solve anyone else's problems. We do it because we want to.
I'd give another read to the programming forum guidelines.
I'm willing to give this another chance, so here it goes:
There's nothing wrong with your code itself, at least the one you shared here anyway.
A possible issue I can see is if you have more than one of these objects in the same room, that's for sure.
If this is what you intend to have, then I'd think of another way to go about this, possibly with a single controller object that can call emitter scripts.
I still don't think you need two particle systems.
Okay so I got it solved. Yes because I put the particles in one system but no thanks to your lack of a simple explanation. Because you see what I had thought you were saying, since you didn't really give me a direction to work with, was that I had to set up EVERYTHING particle related in ONE object. which of course was a mess and didn't even work anyway because again, 2 systems.If your question is vague, your answers are gonna be vague.
If you start getting rude, ppl are gonna be rude as well, since it's not our job to solve anyone else's problems. We do it because we want to.
I'd give another read to the programming forum guidelines.
I'm willing to give this another chance, so here it goes:
There's nothing wrong with your code itself, at least the one you shared here anyway.
A possible issue I can see is if you have more than one of these objects in the same room, that's for sure.
If this is what you intend to have, then I'd think of another way to go about this, possibly with a single controller object that can call emitter scripts.
I still don't think you need two particle systems.
well then you can't really bother speaking can you? Don't say mine is wrong if you don't have the answer or even know where to find it. You said all 500 of your systems have the same name, that's what I just pointed out, that I had t put all the particles in the same system to make it work. Of course the systems have the same name.I have one particular room with about 500 particle systems all with the exact same name and they don't overwrite each other. Some are in separate objects and a a dozen or so are in one object. I've never witnessed anything like one system overwriting another, so I don't think that's what's happened to you either. So still not sure what you have done.
Passive aggressive. A for effort.Glad you fixed your own mistake and sorry I couldn't correctly theorize about how you messed up. Maybe next time I'll guess better.
However, I looked through you code and didn't see anything obviously wrong. Given that you can have multiple systems without a problem and removing the two systems from their original objects and combining them into a new object fixed the probelm implies one of two things. Either (a) the code in one of the systems was just wrong enough that it didn't work so when it was re-done it was fixed. Or (b) an object, likely outside of the original two, was interfering in some way and changing the objects cut off that interference. I think the easiest thing would be to test both systems in a clean project and then bring them in.Before you can create particles you need to create a particle system. This is a "container" where you place your particles and emitters (if you need them) ready for use, and you can put as many or as few particles into any one system as you think necessary, and you can have as many systems as you think necessary too.
Here's the thing. My post actually told you something, but in a nice way. What I meant to say was the above post is nonsense. The manual doesn't say one system will overwrite the other because that's nonsense. I have hundreds of particles systems in the same room. They do not overwrite another. When I said their names were all the same, I did NOT mean they are the same system. I mean I have hundreds of LOCAL systems, all with the same names.Nowhere in there does it say if you place 2 particle systems in ONE room, one system will overwrite the other so nothing IN the overwritten system can be shown.
This was not my error okay?
Well listen, I explained my problem very simply okay? I had 2 objects, both defined their own particle system and when I used both in the same room I could never SEE the particles being made by one system but I COULD see the second object's particles. When I take the second object OUT of the room, I can see the FIRST object's particles again just fine. Now if you still can't follow that here it is again using very few words.Here's the thing. My post actually told you something, but in a nice way. What I meant to say was the above post is nonsense. The manual doesn't say one system will overwrite the other because that's nonsense. I have hundreds of particles systems in the same room. They do not overwrite another. When I said their names were all the same, I did NOT mean they are the same system. I mean I have hundreds of LOCAL systems, all with the same names.
Actually this is irrelevant and I shouldn't have includes that part because it just confused you. The names do not matter.
I also have several global system. About 10 of them. They are created at game start and they are used in dozens of rooms all at the same time Particles systems to not overwrite each other. I tell you that so that you can take that fact and apply it whatever it is that you are doing. If you think a particle system overwrote another, you're wrong. You made an error. What that error is I could not POSSIBLY know because I don't A) have your project in front of me and B) understand your mindset. But I CAN give you a fact that you can take and apply to your situation. So you are very welcome. I do not mind doing it. I'm glad I could help.
You can be mad all you want, but it seems half the topics you make end up going this exact same way... so again, I tell you something that you can take and apply to your situation. You do a very, very bad job explaining your problem. In fact I still don't actually know what it is you are trying to do. I doubt anyone else does. Consider posting a video or a screenshot next time as well as your code all in the very first post and then maybe you'll see a resolution in two posts instead of 15 posts with little information shared and nobody still has any idea what the actual problem was.
The only thing I changed was the joint system. the names and code for everything else is still exactly what it was when I initially made the objects. I mean I don't know what to tell you, I pay attention to changes I make. I'd say if I had altered something drastically because none of the other objects in the room had anything to do with particles. and like I said already like 3 times now, the particles work when they are in the room alone. Just not together. so how could something in one of them be just wrong enough? mess anything else up when there's 2 in the room. I can even have 2 of the same object in the room but as soon as there's 2 objects using different systems one of them stops being visible. I understand they wouldn't skip saying the systems can overwrite each other in the manual if that's the case, but I don't know what else it could be so that just seems to be the thing happening. and my adjustments DID fix it so what other conclusion can I come to?You can definitely have multiple particle systems in the same room. I've done it in the same object (systems had different names). From the handbook (both versions):
However, I looked through you code and didn't see anything obviously wrong. Given that you can have multiple systems without a problem and removing the two systems from their original objects and combining them into a new object fixed the probelm implies one of two things. Either (a) the code in one of the systems was just wrong enough that it didn't work so when it was re-done it was fixed. Or (b) an object, likely outside of the original two, was interfering in some way and changing the objects cut off that interference. I think the easiest thing would be to test both systems in a clean project and then bring them in.
See, I told you I wasn't crazy.Alright, I just figured this out...
View attachment 15660
My apologies for missing it. You had a small error in your code...
You had...
part_emitter_region(lan_system, sphere_type, x-10, x+10, y-10, y+10, ps_shape_ellipse, ps_distr_gaussian);
Should have been...
part_emitter_region(lan_system, sphere_emitter, x-10, x+10, y-10, y+10, ps_shape_ellipse, ps_distr_gaussian);
Because sphere_type is not an emitter, the region was not set and the particles were appearing in the top left corner. Maybe you had something on your screen blocking you from seeing that.
You thinking this was because two of them were in the room was not COMPLETELY wrong. I managed to put both objects in the room and even with your typo, they both worked. The trick was that lan_blast_sphere had to have the lower ID so that it's emitter was created before object_fortune_particle.
So in closure, you weren't as crazy as I thought. Your conclusion had merit. But as is almost always the case, the problem was a typo and unfortunately it was a very easy to miss one.