Formula for self-destruct skill

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
21,987
Reaction score
11,289
First Language
English
Primarily Uses
RMVXA
I want an enemy to attack 3 people and then self destruct.
The following damage formula works when the scope is 'one enemy'
Code:
a.hp-=999; a.atk * 3
However, when I change the scope to '3 enemies' it appears to make no difference, only one of the party is damaged.

Can anyone advise what I should do?
Thanks
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,267
Reaction score
6,011
First Language
Indonesian
Primarily Uses
RMVXA
I don't know if this is even possible because I never tried it, but try to use skill effect --> HP recovery --> -9999 (flat number, not percentage). See if it actually works.

The way how the damage flows work is to execute item/skill effect after it deals damage to the target(s).


Edit:
After I looked at the code, it doesn't seem to work because the effect would also target the same target, not to the attacker. Your best bet would be to use YEA Lunatic series (it enables you to put custom effect before/after skill executed), which it's probably not friendly to setup.

Or maybe, I could try to make an alternative to lunatic series.
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,101
Reaction score
13,596
First Language
English
Primarily Uses
RMVXA
I think Kes means 3 random enemies for scope, 3 enemies not an option in ACE. Unless you did 3 repeats, which would use the same enemy.

I wonder though if the issue is the enemy dies, which stops the attack sequence? I know Yanfly has an ACE script where you can tag a skill with suicide which KO's the user, it's what I used with my Armageddon spell in my game.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
21,987
Reaction score
11,289
First Language
English
Primarily Uses
RMVXA
@bgillisp you're right, I do mean 3 random enemies.
Which script are you referring to?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,101
Reaction score
13,596
First Language
English
Primarily Uses
RMVXA
Lunatic Objects Destruction. I think it does require the Lunatic Objects Script too as well.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
21,987
Reaction score
11,289
First Language
English
Primarily Uses
RMVXA
@bgillisp That looks like it will do the job nicely.
Thanks.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,775
Reaction score
8,195
First Language
English
Primarily Uses
RMMV

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.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Every time the official RMWeb account makes a post, I think it's @Eliaquim writing it!

It's driving me crazy, but it's also wonderfully hilarious.
// Looks at Elfkisser, realizes he'd have to either install Windows 10 or compile it for Linux
// Didn't install Elfkisser.
Too much effort for a curiosity. :popcorn:
I was just high-fiving myself for all I've learnt in the engine, and how far I've come, only to forget to remove the Immortal state from a semi-scripted battle. Now the enemy never dies and I feel so smart >.>
Playtest your stuff. Always playtest.
just spent FOREVER troubleshooting an issue with my keyboard... turns out the cord was just loose OTL

Forum statistics

Threads
99,224
Messages
963,226
Members
130,813
Latest member
Gremter
Top