I am currently in university studying Games Development, and I am trying to work on a game with a group of mine for a project. We are developing a submarine horror game and I want to add a sort of exploding ball type of environmental hazards. My issue is that I am very new to the software and I am having issues trying to simulate an explosion.
which I have recreated in the particles emitter but can’t seem to do it in code so I could add some form of collision. I tried doing “Simulate explosion” but that just seemed to spawn the particles line by line. I want a sort of circular explosion that when spread and touches the submarine, it deals damage. I want it to explode and spread quickly but stop moving after a split second to act like floating spores underwater. I don’t know how to fully explain it, but I have tried animating a basic explosion with a collision, and that seemed to work, but I want that particle effect.
You could create an object as your particle. Maybe call it “shrapnel”.
Set how far each instance goes and how fast. Then tween the speed to gradually slow down if you like. Maybe tween opacity to fade as well.
When an explosion occurs, a number of those shrapnels are created at or around the explosion area. Each instance gets a set angle for direction or angle may be randomized.
You could also attach to each shrapnel a particle emitter. Like smoke or something.
Thanks for the response. I am thinking of doing what you reccomended, but one issue I have is that do I create multiple instances of the particle in the code? and if so, what line of code could I write to spawn in multiple particles at once? I dont see a loop condition in Gdevelop so I am a little confused on doing just the first step. Like for example, I make a condition that triggers once if true, and then I spawn 20 instances of that same shrapnel with the tweening, would I have to manually spawn 20 or is there a loop I could use?
and
“You could also attach to each shrapnel a particle emitter. Like smoke or something”
I did that but because particles emitter doesnt have a collision feature, would I tween instances of the shrapnel based on particle emitter’s movement?
And yeah, I’d add force and direction to each shrapnel object. A smoke particle emitter would be linked to each shrapnel and should just follow along. Maybe use sticker behavior.