RMMZ Making enemies use a different skill when confused?

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
355
Reaction score
544
First Language
English
Primarily Uses
RMMV
I'm sure a few people have run into this issue before...

So in my game, which uses action sequences, enemies use an alternate 'attack' skill instead of the default attack skill (which is skill #1 in the database). This works fine until an enemy is given the 'Confuse' state, which causes the enemy's basic attack to default back to skill #1.

Is there a simple way to set it up so that, when an enemy is confused, it'll use a different skill instead of the default attack skill? I have some Javascript experience, so I figured the change could probably be made in this block of code:

Code:
Game_Action.prototype.setConfusion = function() {
    this.setAttack();
};
Perhaps a simple 'if' statement ('if' subject is enemy, use x skill, else setattack?)

Thanks for your help.
 

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
355
Reaction score
544
First Language
English
Primarily Uses
RMMV
Bump. I'm still trying to figure this one out...
 

zzmmorgan

I've used punchcards
Veteran
Joined
Jul 10, 2020
Messages
112
Reaction score
177
First Language
English
Primarily Uses
RMMV
I took the easy way out - I have a couple of necromancers that I wanted to use ONLY magic attacks so I ended up giving them resistance to confusion........

But I certainly wouldn't mind seeing a way to set a different attack for that status.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
793
Reaction score
346
First Language
English
Primarily Uses
N/A
What I'm working on is an array of skills that can only be used if the battler is confused.
With a notetag like:

<conAttacks: x, y, z...>

Each will have an equal chance of occurring.

I plan to have enemies and actors have this.
 

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
355
Reaction score
544
First Language
English
Primarily Uses
RMMV
What I'm working on is an array of skills that can only be used if the battler is confused.
With a notetag like:

<conAttacks: x, y, z...>

Each will have an equal chance of occurring.

I plan to have enemies and actors have this.
Oh, that sounds really neat! Can't wait to see it :ptea:
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
793
Reaction score
346
First Language
English
Primarily Uses
N/A
All done!

Please check out my plugin found HERE.
 

zzmmorgan

I've used punchcards
Veteran
Joined
Jul 10, 2020
Messages
112
Reaction score
177
First Language
English
Primarily Uses
RMMV
I was thinking of trying to do projects in MZ without plugins but sometimes it's easier with them.......
And I see you have your dual wield over into MZ.......
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
793
Reaction score
346
First Language
English
Primarily Uses
N/A
If you can do it yourself, feel free to, but if it was already done and you are fine with the work, why reinvent the wheel?

And yup!
Feel free to use any of my plugins.
Note that a good number of my MV plugins work fine on MZ.
Feel free to ask if you need assistance.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Hey everyone! Not sure how many people know about Cafofo Music on Itch.io, but I highly recommend their Sound Effects! It is amazing quality AND quantity and best of all, they are having a 50% sale! I can't express how much I love sales.
Wow.... My last map GIF got 47 likes, 16 retweet and 2,105 views on Twitter in 24 hours. My game thread here's only got 3k views in 6-7 months. I guess building my Twitter was insanely worth it. :LZSexcite:
working hard working hard working hard >:)
Do you have an audio you want me to animate? If so send me the youtube link and I’ll animate it.
Okay, so I'm working on Draft 2 of my game's script.
Will try to keep you guys posted, if you're interested!

Forum statistics

Threads
105,593
Messages
1,014,860
Members
137,258
Latest member
WhimsicalFae
Top