RPG Maker Forums

Hello! I'm trying to get Shin Megami Tensei styled instant death abilities to work, and I'm having a bit of a doozy of a time since my scripting knowledge is lackluster, so any help would be appreciated.


By Shin Megami Tensei styled I mean that the instant death is elemental in nature - you have light elemental instant kills, and dark elemental instant kills, and these can be reflected, resisted, or nullified separately from a generic "apply state Death" ability - if I just made it so enemies nullified instant kills with state 0001, there wouldn't be a difference between using light elemental instant kills and dark ones, and I want there to be a difference. Connecting the state to the element isn't necessary (i.e if they have a resistance to Dark it wouldn't have to automatically resist Dark-Death either, I have no problem doing that manually), but just having the two separate elemental deaths would be great.


I tried repurposing the "Doom" code from Yanfly's Doom tips & tricks, but instead of being on expiry, it was on state application, and that didn't work. Then, I tried making it on Confirm effect, nothing, React effect, also nothing. The code I used is in the spoiler - the javascript itself is completely unmodified, the only thing I changed is that it was on apply (in state form), confirm, or react (on the spell itself). I also tried changing "user" to "target" for the variations where I coded it directly into the ability, but again, nada.

<Custom Leave Effect>


// Get the death state for the user.


var deathState = user.deathStateId();


// Check if the user is not immune to death nor resistant to it.


if (user.stateRate(deathState) > 0.01 && !user.isStateResist(deathState)) {


// Play animation on the user.


user.startAnimation(65);


// Set the user's HP to 0.


user.setHp(0);


// Check if the user is dead.


if (user.isDead()) {


// Make the user collapse.


user.performCollapse();


}


}


</Custom Leave Effect>



Any help would be appreciated! Thank you!

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top