How do I fix this problem?

Well, the issue is, the explosion sprite doesn’t disappear after it finished its animation. Which means that when I create the “Target” on the area where the explosion sprite is, it quickly deplete the “Target” variable “Durability”. Here are my event editor screen and a clip about the issue:

Untitled - YouTube

From the YouTube link:

image

And you should at least describe the issue - we can’t tell what you expect from the code, and unless it’s really obvious in the video, we may not be able to work it out from there either (and remember what’s obvious to you may not be to others).

Anyway, it’s looks like my topic just become some kind of uploaded draft until earlier, when I came back here . You can see what I’m saying now. Can you help? Thank you.

Your explosion doesn’t disappear because you’re not deleting it. If the explosion is an animation, check the animation has finished, then delete the explosion sprite.

To prevent the explosion from depleting your target durability value, add a “Trigger once while true” condition on the “Explosion is in collision with Target” event condition. Otherwise, the Durability value will decrease every frame.

It worked, thank you. But, another issue coming up. That is the explosion sprite doesn’t seems to damage the “Target”.

Can you show what the events look like now?

Here, my event editor screen

I see a bit of a problem - you’re deleting GrenadeRound, and then referencing it in subsequent event conditions. These will always be false, because GrenadeRound no longer exists. Fix this, then then we’ll see about the explosion not causing damage to the target. Place the delete action as a final subevent.

Hey, it kinda worked. Here is my event again after I did like you told me:

Err, not quite. You need to move the delete GrenadeRound into a final subevent off the “Target is in collision with GrenadeRound”, and shift the 2 references to GrenadeRound as sub events before the GrenadeRound delete action.

I’m a bit confused about that. Can you explain a bit more on how to fix it?

Does this help?

No idea, but, I slightly change the X position of my “GrenadeRound” and my “Explosion”. The result wasn’t that good and bad at all.

I meant, does the visual help explain what you needed to do to fix your code?

No, I don’t see anything change much.

You can’t see the difference between your code:

and mine?

No, especially during preview. Mind you explain how it change the preview?

Eh?? The images have nothing to do with the preview. They are of the events in the editor. Your events are incorrect. Get your events the same as mine as shown in the images, and then we can continue.

I did like said you said. With exception of slightly adjusting the X position of my “GrenadeRound” and my “Explosion”.

Ok, can you screen shot the events again, and we’ll see what’s going on?