Hi! I was hoping I could implement an effect where a PNG image pops in or fades in when a character dies, then fades out two seconds later, like this:
(base screenshot taken from DerVVulfman's Lani's Locks)
It need not be an animation sheet, just a PNG is more than enough (see attached for examples) but really, whichever is easier to implement would be great.
Currently, I am without my main system ... ergo without RPGMaker. But I am wondering if this can merely be done within the TROOPS database.
The 'collapse' effect which changes the default battler red and fades the battler away is done because it it is a sprite object. That being an object that is given and holds a picture image (imagine a picture frame), and it is the frame that is controlled by such effects. And when one uses the [SHOW PICTURE] event, they are actually creating a sprite to hold a picture.
I am kinda spitballing, so this is not tested. I am thinking that this could be pasted within your individual TROOPS database pages that are set to run all the time to detect HP changes, both for heroes and enemies.
If the player formation doesn't change in-game, this would work. And it would work for the enemies as well, this assuming it is used in the desired individual TROOP pages. If for the actors, this would be used in every page. And this could be adapted for the enemies.
Again, spitballing as I am not at a PC with RPGMaker.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
(Yesterday, 01:42 PM)DerVVulfman Wrote: Currently, I am without my main system ... ergo without RPGMaker. But I am wondering if this can merely be done within the TROOPS database.
The 'collapse' effect which changes the default battler red and fades the battler away is done because it it is a sprite object. That being an object that is given and holds a picture image (imagine a picture frame), and it is the frame that is controlled by such effects. And when one uses the [SHOW PICTURE] event, they are actually creating a sprite to hold a picture.
I am kinda spitballing, so this is not tested. I am thinking that this could be pasted within your individual TROOPS database pages that are set to run all the time to detect HP changes, both for heroes and enemies.
If the player formation doesn't change in-game, this would work. And it would work for the enemies as well, this assuming it is used in the desired individual TROOP pages. If for the actors, this would be used in every page. And this could be adapted for the enemies.
Again, spitballing as I am not at a PC with RPGMaker.
Hi, DerVVulfman! Would this mean I'd have to set it up for every troop entry in the database? I was hoping it would be more of mechanic, as I currently have over 200 entries in the Troop database tab and 32 characters in the game (though I only plan on putting a death message for three or four of them).
Yer definitely looking for code. Methinks you'll want something like a secondary collapse-like option in the RPG::Sprite class. That will need be coded.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
1 hour ago(This post was last modified: 1 hour ago by kyonides.)
You'd have to manually add the collapse method to the Sprite_Battler class to make it appear.
Code:
class Sprite_Battler
alias :last_words_sprt_btlr_up :update
def update
last_words_sprt_btlr_up
reset_last_words
end
def reset_last_words
return unless @last_words and @_collapse_duration == 0
@last_words = false
# your Last Words destruction code here
end
def collapse
@last_words = true
# your Last Words creation code here
super
end
end
You gotta know that RPG::Sprite already has a collapse method, BUT not all of your sprites have to show those last words before disappearing. That's why I recommended to add it to Sprite_Battler and call super like I did there to let it apply RPG::Sprite's collapse method's effects accordingly.
The disposal of that custom sprite of yours was a bit tricky, but you can simply alias Sprite_Battler's update method and add your custom code there. You can take a look at my example to get an idea on how to do it.
NOTES
This piece of code assumes you already know how to create sprites and add bitmaps to them.
@last_words is a flag you desperately need to keep track of your Last Words process at all times.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.