How to make a enemy use a weapon?

Okay i got a problem, when you create a enemy in RPG Maker MZ, on attributes you can add what type of weapon you want to enemy have. Okay, i want that he can equip shotgun, but now...
How can i do that enemy use the pistol, when im in a fight the normal attack is a meele attack and the pistols habilities cant use it. That's a example. I guess he needs to equip the shotgun, but how i can do that? Thank you.
1661675783318.png
no, you're mixing up two different things.

The first part is the function of weapons (or all equipment really). In the engine the only function of an equipment is to add values to the actor. This function does NOT exist for enemies as you are supposed to balance and set their values directly.
The traits you add are for this part and as such they have absolutely no function on an enemy.

The second part is the animation display on skill use. Here the engine provides a method to link different pictures to the skill display, based on the weapon type value (not even the weapon itself, only its type) that is currently assigned to the actor.
again this part does not exist for the enemies because they have no equipment at all.

The only way to change that is to add plugins providing that functionality.
and that is why I explained the difference, because most plugins or scripts called "enemy equipment" only add the first functionality and ignore the second part (which is what you are asking about).

you need to read very carefully about what a plugin does to find the correct one, perhaps a combination of enemy actor sprites and action sequences programmed to use the weapon sprites?
no, you're mixing up two different things.

The first part is the function of weapons (or all equipment really). In the engine the only function of an equipment is to add values to the actor. This function does NOT exist for enemies as you are supposed to balance and set their values directly.
The traits you add are for this part and as such they have absolutely no function on an enemy.

The second part is the animation display on skill use. Here the engine provides a method to link different pictures to the skill display, based on the weapon type value (not even the weapon itself, only its type) that is currently assigned to the actor.
again this part does not exist for the enemies because they have no equipment at all.

The only way to change that is to add plugins providing that functionality.
and that is why I explained the difference, because most plugins or scripts called "enemy equipment" only add the first functionality and ignore the second part (which is what you are asking about).

you need to read very carefully about what a plugin does to find the correct one, perhaps a combination of enemy actor sprites and action sequences programmed to use the weapon sprites?
Okay now i understand, i was thinking too about the action sequences but with my beginner level is actually a little hard. I know the minimum about the action sequences and im trying to learn faster, but now that i know that i think i will swipe for now and focus in the easier things for my game.
Anyways thank you so much for the help. <3

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-enemy-use-a-weapon.150876/