Formula for self-destruct skill

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,003
Reaction score
11,327
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,284
Reaction score
6,035
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,115
Reaction score
13,615
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
22,003
Reaction score
11,327
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,115
Reaction score
13,615
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
22,003
Reaction score
11,327
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,786
Reaction score
8,201
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 Posts

Latest Profile Posts

Inspired by @fluffymonster 's Cute Ghost
His name is POKO!
I made a giant tree + treehouse for the next country woods pack \o\
Calculated my tax refund - CHEERS
Looked at my student debt - cries
Still, might be just enough left over to pay for my new computer, which would be awesome!
And my student debt will be fully paid, which is also pretty nice.
They say nice guys finish last. But mean guys don't finish at all!
I keep forgetting how much I hate how VX-MV implements fences and autotile tables.

Forum statistics

Threads
99,413
Messages
965,032
Members
131,035
Latest member
KeziaG96
Top