Author Topic: Projectile Explosion  (Read 918 times)

Wizard Indie Games

  • Level 7: Tilbub
  • *
  • Posts: 145
    • View Profile
Projectile Explosion
« 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?
Developer of:

AI Anomaly
Dickie A Cumming
Someone Cloned The President
Freedom! Do or Die
Pension Day
Red Mist: Rivers of Blood

Available on Steam

Gizgord

  • average
  • Level 18: Statix
  • *
  • Posts: 835
    • View Profile
Re: Projectile Explosion
« Reply #1 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).

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: Projectile Explosion
« Reply #2 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.

Wizard Indie Games

  • Level 7: Tilbub
  • *
  • Posts: 145
    • View Profile
Re: Projectile Explosion
« Reply #3 on: September 23, 2020, 05:19:42 PM »
OK. Thank you both.
Developer of:

AI Anomaly
Dickie A Cumming
Someone Cloned The President
Freedom! Do or Die
Pension Day
Red Mist: Rivers of Blood

Available on Steam