- Joined
- Dec 29, 2015
- Messages
- 27
- Reaction score
- 4
- First Language
- English
- Primarily Uses
- RMMV
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.
Any help would be appreciated! Thank you!
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>
// 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!

