SpakTheComposer

Possibly a glitch in the system
Veteran
Joined
Dec 5, 2016
Messages
80
Reaction score
4
First Language
English
Primarily Uses
RMMV
Hi,

so basically, as the title suggests, I'm trying to create a "lives" system since I thought it would be a good way to balance having a single party member (along with some other things). I have a system in the troop window where when the player reaches 0 HP, if lives are above 0 then the player gets revived. The problem i've been facing is that it seems to only register once and reset the "lives" variable to 0. I also want to play an animation on the svactor when the player gets revived. The other (very small) problem is that it's a bit inefficient to have to paste that page to every troop. Any ideas of how I could fix this system?

Thanks,
Spak
 

TheGentlemanLoser

"And when we fall, we will fall together..."
Veteran
Joined
Dec 30, 2020
Messages
222
Reaction score
268
First Language
English
Primarily Uses
RMMV
The good news is that this is entirely doable with just eventing.

The other (very small) problem is that it's a bit inefficient to have to paste that page to every troop.

back in my day, we used to have to walk up hill in the snow both-ways to and from school do just this if we wanted any non-default functionality in combat. this is what the "common event" event command/database tab is for, although I don't recall off the top of my head if it can contain certain battle scene specific functions, and if it can you're still going to need to CALL the common event in every troop.

playing an animation on the actor shouldn't be an issue like there's an event command that does exactly that.

The problem i've been facing is that it seems to only register once and reset the "lives" variable to 0.

w/o looking at your event "code", we can't tell you what you're doing wrong! I mean the raw logic is

if hp = 0
then if lives >0
then variable lives-1, play animation (w/e) on actor, full recovery
else gameover

(this isn't code don't try to paste it in anywhere this is random gobbledygook I typed to convey the logic)

neat idea, btw. It's pretty bog standard in videogames generally but I don't know that I've ever seen it in an rpg maker game and I've played a LOT of rpg maker games.
 
Last edited:

SpakTheComposer

Possibly a glitch in the system
Veteran
Joined
Dec 5, 2016
Messages
80
Reaction score
4
First Language
English
Primarily Uses
RMMV
The good news is that this is entirely doable with just eventing.



back in my day, we used to have to walk up hill in the snow both-ways to and from school do just this if we wanted any non-default functionality in combat. this is what the "common event" event command/database tab is for, although I don't recall off the top of my head if it can contain certain battle scene specific functions, and if it can you're still going to need to CALL the common event in every troop.

playing an animation on the actor shouldn't be an issue like there's an event command that does exactly that.



w/o looking at your event "code", we can't tell you what you're doing wrong! I mean the raw logic is

if hp = 0
then if lives >0
then variable lives-1, play animation (w/e) on actor, full recovery
else gameover

(this isn't code don't try to paste it in anywhere this is random gobbledygook I typed to convey the logic)

neat idea, btw. It's pretty bog standard in videogames generally but I don't know that I've ever seen it in an rpg maker game and I've played a LOT of rpg maker games.
1618187614895.pngHere's a picture of the "code", as well as a very early game project ha ha. Where's the animation event you're talking about? As far as I'm aware, there's only an animation that targets enemies and overworld sprites (you can ignore the battle one I put that was just for placeholder's sake). I guess doing common events would make more sense, I just thought it was kind of redundant since the tab would have to be pasted in every battle anyways.
My only guess is that this event tab is running multiple times, but for some reason I tested it again and it actually worked for 2 out of the 5 lives i set.

Hopefully that helps,
Spak

neat idea, btw. It's pretty bog standard in videogames generally but I don't know that I've ever seen it in an rpg maker game and I've played a LOT of rpg maker games.
Thanks!
 

TheGentlemanLoser

"And when we fall, we will fall together..."
Veteran
Joined
Dec 30, 2020
Messages
222
Reaction score
268
First Language
English
Primarily Uses
RMMV
righthere.png
huh, wait, weird, clearly you're already using that...it can't target an actor? WEIRD! I didn't even remember that. you can use "force action" as a workaround in a couple of ways however to get past this (either forcing a dummy skill with the desired animation to play on the actor or putting your actual healing effect along w/ the animation inside of a skill effect).
 

GBJackson

Veteran
Veteran
Joined
Dec 11, 2016
Messages
112
Reaction score
109
First Language
English
Primarily Uses
RMMV
Maybe the solution is to have a parallel common event that constantly runs in the background, Let it constantly check for player death and let it manage the revival and animation call.
 

Drakkonis

Veteran
Veteran
Joined
Mar 5, 2021
Messages
130
Reaction score
94
First Language
English
Primarily Uses
RMMZ
I know that Yanfly has a Base Troop Events plugin, where you set a base troop in the parameters, and then every event page in that troop is copied at runtime to every other troop when you encounter them. Very useful for efficient eventing something that needs to happen in any and all fights.
 

SpakTheComposer

Possibly a glitch in the system
Veteran
Joined
Dec 5, 2016
Messages
80
Reaction score
4
First Language
English
Primarily Uses
RMMV
So I actually figured out what the problem was (forgot to post here again), basically the only problem was that I had the span set to battle, so it was only triggering once. I set it to turn now and it works fine. I also changed it so when the character dies, a skill is forced which takes care of the reviving which consequently fixed the animation issue.
I know that Yanfly has a Base Troop Events plugin, where you set a base troop in the parameters, and then every event page in that troop is copied at runtime to every other troop when you encounter them. Very useful for efficient eventing something that needs to happen in any and all fights.
Thanks for that tip, very useful!

My only thing now is that I want the sv animation to remain in the "dead" pose until the revive animation has been completed. How do I achieve this (I believe you can do it with Yanfly Plugins, not sure how or which ones though)?
 

Latest Threads

Latest Profile Posts

Just finished my first Slip into Ruby since last July! It'll be up and added to the main post tomorrow, along with a new Jump into Javascript.
to pass the time.pngTesting out making boxes and packs of items. These things are always fun to do.
Rural Japan Tiles, Giant Dragon Sprite, Paint Icons? & Game Spicy Pixel Fonts | RPG Maker News #31

just hopped into project recruitment... hoping to maybe find some artists to help with parallax maps and whatnot. I could do them myself, but I'm not really good at it so I'd prefer to stick to my strengths which is character art and SOME UI elements.

Forum statistics

Threads
111,101
Messages
1,058,285
Members
144,305
Latest member
Fertrick
Top