Shockwave Explosion

How do I…

I’m trying to create an explosion like a shockwave that will hurt the enemies by a certain amount but will not move them or throw them away, the enemies are moving and I don’t want them to stop or change directions (Freezing might come later with a power up).

The problem I’m having right now is, that is not working as I think it should (or as I want it to work). It’s either killing all the enemies the shockwave touches (because it’s applying damage every frame the collision is true) or it’s just hurting the firsts enemies it touches by the amount specify if I add a repeat once.

Now I have try 3 methods:
1- Using the shockwave extension.
2- Using a shape painter drawing a circle.
3- Using a sprite object.

Please see the screenshots. Also please note that I turn on all the events just for the screenshot I don’t have the 3 methods on all the time.

With Method 2 I’m getting the result I want, which is apply specify damage to every enemy that the “explosion” touches, But I don’t have the shockwave effect, as I can’t scale or resize the circle drawn with the shape painter, so all the enemies are hit at the same time regardless of how far or closed they are to the explosion.

With Method 1 and 3 I’m having the same results. The way you see it in the screenshot, it will only hurt the first row of enemies, basically the enemies it touches first. If I take the trigger once, then it will apply damage every frame as long as the explosion is touching the enemies and will kill them all.

Any suggestions or idea on how to make it work?
Thanks in advance!

Some Extra Info:
Explosion Visible = The object using the shockwave extension.
Explosion Charged = Shape Painter.
Xplosion = Sprite
Enemies = Is a group where I have all the enemies sprites.
The enemies are using the physics behavior as Kinematic.

I hope I explained myself well.
Here are the screenshots.


Trigger once works on an object level, to give objects a trigger once like effect, you can use an object variable. In this example an object boolean named HitOnce given to the Enemy object.

Here’s how I tested it.

Note: the shape painter uses the bounding box for collisions. As it’s drawn on, the bounding box grows to fit the drawing but it’s always tye smaller box that contains pixels.

1 Like

Thanks! It worked as intended.
It’s just not setting the variable back to false after the tween is finished playing in the last event, so it’s working on the first time only, but that’s fine, I’ll take care of solving that.
Again Thanks!

1 Like