(Solved) Created object doesn't show up but is present in debugger (not Z order problem)

Hi! I created some events for a shooting animation where it’s supposed to be the usual,
Press a button, a bullet is created along with a muzzle flash animation.
But for some reason the muzzle flash kind of goes on and off. Sometimes it shows up properly, other times it doesn’t.
If the bullet hits a target or hits the ground an appropriate explosion is also created and the bullet deleted. The explosions are set to be deleted when their respective animations are finished.
All of those work properly except for the muzzle flash animation.
I looked into the forums and most similar issues appear to have been fixed by changing the z order. I tried that and it still didn’t fix it.
I also tried switching the animation files. It’s still only the muzzle flash that acts up.
When I looked into the debugger at the time when it was acting up, it showed that there were multiple instances of it. Instances which were supposed to have been deleted already.
Also during those times that the muzzle flashes don’t show up, sometimes after a bit of time has passed, all the instances that were “stuck” suddenly appear simultaneously. Then it all works again. After a while, it gets stuck again, and so on.




I’m not an expert, but does your ExploMuzz01 has an animation? I’m not sure, but it seems you are creating your sprite but not playing the animation, so the condition “The animation is finished” doesn’t trigger to delete the sprite.

What zutty wrote + there is fire bullet extension which have condition
Object just fired
So whenever your player fired you can add action to do something like create explosion and play it’s animation
Also it have built in cooldown for firing and overheat so you could get rid of your timers

Yes, it’s animated. And it’s also set to play upon getting created since there’s only one set of animations it uses. And it does play at times, then after some time has passed, doesn’t appear anymore. But they’re there in the debugger. Then after even more time has passed, I’d see 5 or more explosions going off at the same time at those places where it’s supposed to have fired. And the debugger is then cleared. After a while longer, cycle happens again.
The other “explo–” objects use another set of animations. I even tried swapping their animations with those of the ExploMuzz01 explosion object. The animations work perfectly with the other events. It’s only the ExploMuzz01 that acts up. It’s really weird. My guess at the moment is that the game project file could be corrupted or something. Idk. I’m thinking I might have to builld the whole thing from scratch. Thanks for the reply though.

I’ve been trying to avoid using extensions since I kind of wanted full control of everything that goes on in the game. Also there are some features that I’m planning on which I’m not quite sure if whether or not are covered by the extension. But I suppose at this point, I may as well try it. Thanks for the suggestion.

It is not like you use extension and you cut out yourself from using events
I sometimes use fire bullet extension yet for whatever reason control bullet via events like give it speed using forces
Do not be afraid to experiment

So I tried using the fire bullet extension. For the life of me, I can’t seem to find the function for it to create a muzzle flash when firing. As shown in the tutorials, it’s got all the bells and whistles though it seems a bit too much. Kinda like bringing a backpack full of tools when all that’s needed are a screwdriver and pliers. Nonetheless, I do appreciate having the other tools ready. You know what they say, “Better to have something and not need it, than need something and not have it.” lol. Yeah I might as well work with it. Though it still doesn’t fix the Explomuzz event thing. I still have to manually setup the actions for creating the animation and all.
So, yeah I even tried to rewrite the whole scene. It’s really weird. I guess the only thing I could think of that I haven’t tried is re-create the whole game from scratch. But I think I might as well let it go for now. Everything else works properly anyway.
Thanks all for the replies and suggestions!

There is no action to create that effect
But like i said there is condition to check if object just fired
And you can use that to shove in some action
So like if object just fired you add action to create object and set its animation to play (actually in this case you would set frame to 0)
And that is the trick to getting explosion
Or for weapon to move or both

Ahh I see. Yes. Okay.

So I tried that after reading your comment. It’s still acting up. :frowning:
It’s okay though, I’m sure when this thing gets resolved it’s probably something simple. Just idk at the moment. I suppose if I sleep on it, I might get some profound realization. Then I’d feel really lame. lol.
Thanks again! I really appreciate the help.




OK not gonna lie i do not know which you need so here are both

Here arm moves as you fire + explosion effect is created when bullet is fired

And whole magic behind it is here
BOTH effects are done via animation i am NOT changing X or Y of any object to create effect (i only create explosion and move it to proper point on arm)

I do not know why it works but it works only IF i go with changing frame to 0
For whatever reason playing animation do not do anything
But changing animation to 0 just kinda solves the problem so keep that in mind

1 Like

uhh… Okay so weird thing… I deleted the ExploMuzz object from the game. Removed all references and everything. Then saved. Then created a new object with the same set of images. I named it ExploShiz.

It. works.
I’m like… what the? lol. I swear, I knew I’d feel lame when I get to solve it, but I still know nothing.

Then now, I just read your reply. Yeah, I think I get what you mean, not just the animation set but also the animation frame itself. Like the very first image in the set of images. And yeah, I’m gonna go ahead do that too, best to cover all bases.

I’m not sure if that bug would happen again or if I could even replicate that if I tried. But I sure am glad it’s resolved. Thank you very much, good sir, for being patient and helping me resolve this. I really appreciate it.

1 Like