Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: CriticalHit on July 15, 2019, 10:38:55 pm

Title: Blizz ABS Item Explosion Animations
Post by: CriticalHit on July 15, 2019, 10:38:55 pm
I'm trying to make a grenade-type item in Blizz ABS for RMXP. I set an item to explode on contact or end but the explosion animation only plays when enemies are within the explosion range, 3 squares in this case. When no enemies are within the explosion range, the grenade just disappears. Is it possible to have the explosion animation play even though there are no targets within the item's explosion range when the item reaches the end of its thrown range? ? It looks weird to throw a grenade that doesn't explode. The item is set to "shooting/thrusting". I've tried setting it to "timed" but same problem, animations only play if enemies are within explosion range. Am I doing something wrong or is this how it is suppose to work? Thank you.
Title: Re: Blizz ABS Item Explosion Animations
Post by: KK20 on July 15, 2019, 10:44:29 pm
That is how it was designed. I feel like I've done this type of request before in the past, but this was many years ago.
Title: Re: Blizz ABS Item Explosion Animations
Post by: CriticalHit on July 16, 2019, 11:46:22 am
I was afraid of that. If I were to modify the script to play an animation when the projectile makes contact or "ends", how do you suggest I go about doing it?
Title: Re: Blizz ABS Item Explosion Animations
Post by: KK20 on July 17, 2019, 04:02:35 am
I've spent the better part of an hour to see if there was any quick way to do it, but nothing came up yet. The idea is to set the projectile sprite's animation_id when the check_explosion call is made. You'll have to edit some of the update methods for Spriteset_Map and other sprite classes to ensure that, for this special scenario, you don't prematurely dispose the projectile sprite until after the explosion animation finishes.

I'm at a point where I can see the first few frames of the animation but a fade_out flag is being set, which causes the opacity to reach 0 and the animation disappears (probably because one of the update methods I pointed out above is disposing the sprite).