Formula for self-destruct skill

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,019
Reaction score
11,352
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,311
Reaction score
6,073
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,145
Reaction score
13,646
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,019
Reaction score
11,352
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,145
Reaction score
13,646
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,019
Reaction score
11,352
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,804
Reaction score
8,206
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

Learning C on the side to support Haxe.
Imagine having a different opinion on the internet.
Crazy.
Here's the one that flee from no foe, the brave Sir Kiwival! Also protagonist of my current project.

This is the cover art of new game, "Primordial Essence".
I'm amazed at the performance increase I saw in just going through and rescoping the variables in other people's plugins that I'm using. You know what that means? :LZSexcite:
//Tosses more absurd stuff onto the game of "Jenga" that is his RM project.
:rheh:

Forum statistics

Threads
99,672
Messages
967,895
Members
131,351
Latest member
Makual
Top