Platform Builder Forums

Help and Support => Working with Platform Builder => Topic started by: Wizard Indie Games on September 23, 2020, 08:54:33 AM

Title: Projectile Explosion
Post by: Wizard Indie Games on September 23, 2020, 08:54:33 AM
This problem is driving me nuts.

I want an enemy projectile to use a custom sprite animation instead of the standard explode effect when hitting the target, striking a surface or timing out. No matter what I do the projectile seems to destroy itself before any of my commands can work.

I've tried changing the projectile's sprite at the point of impact. I also made another projectile with the explosion as its sprite and tried to change the projectile to the explosion.

Nothing seems to work. Does anyone know a way to do this?
Title: Re: Projectile Explosion
Post by: Gizgord on September 23, 2020, 09:35:43 AM
this is a far-fetched idea, but you could try:

replace projectile with a custom enemy (with your sprite), check 'hurt enemies' and 'affect item blocks' (to match the behavior) and add a delay command for how long do you want the explosion to last (remove the enemy. make sure to change death setting to none).
Title: Re: Projectile Explosion
Post by: CGM on September 23, 2020, 12:14:39 PM
I've been able to do this before. Just turn off explosions, and cause your explosion sprite to spawn over the enemy, and at the right moment, kill the enemy, and delete the explosion sprite.

You can try both ideas from Gizgord and I if you wish. My idea works pretty good.
Title: Re: Projectile Explosion
Post by: Wizard Indie Games on September 23, 2020, 05:19:42 PM
OK. Thank you both.