Right, my project mostly revolves around Magic and it is like their spiritual life source so I am looking for a script that works similar to Star Ocean's MP system, when their MP hits 0 they die.
if there is already a script made can you please point that out to me, thanks!
My first script(snippet) request fulfilled (seems to work ok for me thusfar, but yeah, am a novice scripter at best.)
class Game_BattlerBase alias mpdeath refresh def mp=(mp) @mp = mp if mp == 0 self.add_state(death_state_id) end refresh endendJust insert below main, like all other scripts.
I will test this out.
One more question, is there a way to let one character be immune to this 0 MP death script because her character like plays an important role of not having MP, sorry for making this a little bit more complicated.
class Game_Actor def mp=(mp) @mp = mp if mp == 0 and not actor_id == whatever_actor_id_of_the_one_who_should_be_immune self.add_state(death_state_id) end refresh endendthe 0 mp will only affect actors btw, the old one affects actors and enemies...
though you can use them both if you want it to still affect enemies while having the
immunity of some actor
Standard did you try in an empty project? I was testing it a while ago and it seemed to be fine?
Then the other scripts seem to be rejecting it, dammit Q^Q
Although it makes no sense, the very first script given doesn't make errors and works perfect but the script that you can make a character immune to the MP death crashes when a character dies from 0 MP death.
yes... it should be @actor_id or if it doesn't work, try self.id
ALRIGHT! Managed to get it to work, thanks so much everyone you are the best! This can be closed now.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.