Actually you can make a Troops in the database and event it.
Eventing it you can add something to be executed in each turn.
You can then call a common event.
You go and create a common event that checks current MP.
If 0 the hero dies LOL.
Else nothing happens.
There! Using just eventing.
EDIT: Or use the script that :ninja: bgillisp :ninja: gave you I guess
Second edit:
[SIZE=14.4444446563721px]Problem is that using eventin this check occurs some certain time instead of instantly....[/SIZE]
so go with the script without hesitation.
bgillisp, thanks a lot, but... How do I make that only happens when the player/enemy has certain state?
I never got the script that far I'm afraid, as I wrote it for a quick fix to do like Star Ocean 3 did (KO on no MP). Do you intend it to only happen on one specific state? If so I can probably add a quick fix for that. If you need more than one though that might be beyond what I can do as a scripter at the moment.
Only when they have certain state, they'll die if their MP is equal to 0, can you make a fix for that? Thanks
I'll see if it can be done. Give me a couple days though.
Just put it under his script... that's easier to do...
Using them already and it shows a mistake in this line
if(self.mp <= BG_mp_zero_state::Mp_zero_value and self.state?(BG_mp_zero_state::Zero_state_required)))
Ah. it needs to be in a single line... can't do that on the post because it does a word wrap
It's in the same line already, it's so... Bizarre
Ah, seems like there was an excess )
There should only be two ), not three
Now showing the "Stack level too deep" mistake
then just replace the old method from the original script with the edited one...