I managed to do this in the past, but after a long hiatus due to illness I can't remember how I did these two things:
Yanfly has a variety of tips and tricks on their site and one of them is for a move based on Judgement from Pokemon - where the attack is based on the element of the weapon held by the character. In my game there is a character who switches her element every time she is struck by a new one (she can also shift her element manually). I use states to do this and I swear I used to know how that worked. I can't remember what I typed in place of weapons to make based on the character's state instead. (I only remember I have to change the "user.hasWeapon($dataWeapons[X]" parts)
// This will move the user to the target if the weapon is melee
// or else it'll be standing from afar.
<Whole Action>
if user.attackMotion() !== 'missile'
move user: targets, front, 20
else
perform start
end
</Whole Action>
// This will play the user's attack animation. Then, it will check
// user for specific equipped weapons. If the matched weapon is
// present on the user, then force an element and play an animation
// that varies depending on the element used.
<target action>
motion standby: user
wait for movement
face user: target
motion attack: user
wait: 10
attack animation: target
wait for animation
if user.hasWeapon($dataWeapons[1])
force element: Fire
animation 130: target
else if user.hasWeapon($dataWeapons[2])
force element: Ice
animation 134: target
else if user.hasWeapon($dataWeapons[3])
force element: Volt
animation 138: target
else if user.hasWeapon($dataWeapons[4])
force element: Water
animation 142: target
else if user.hasWeapon($dataWeapons[5])
force element: Earth
animation 146: target
else if user.hasWeapon($dataWeapons[6])
force element: Wind
animation 150: target
end
action effect
clear element
wait for animation
</target action>
http://yanfly.moe/2016/07/15/tips-tricks-judgment-pokemon-rpg-maker-mv/
// or else it'll be standing from afar.
<Whole Action>
if user.attackMotion() !== 'missile'
move user: targets, front, 20
else
perform start
end
</Whole Action>
// This will play the user's attack animation. Then, it will check
// user for specific equipped weapons. If the matched weapon is
// present on the user, then force an element and play an animation
// that varies depending on the element used.
<target action>
motion standby: user
wait for movement
face user: target
motion attack: user
wait: 10
attack animation: target
wait for animation
if user.hasWeapon($dataWeapons[1])
force element: Fire
animation 130: target
else if user.hasWeapon($dataWeapons[2])
force element: Ice
animation 134: target
else if user.hasWeapon($dataWeapons[3])
force element: Volt
animation 138: target
else if user.hasWeapon($dataWeapons[4])
force element: Water
animation 142: target
else if user.hasWeapon($dataWeapons[5])
force element: Earth
animation 146: target
else if user.hasWeapon($dataWeapons[6])
force element: Wind
animation 150: target
end
action effect
clear element
wait for animation
</target action>
http://yanfly.moe/2016/07/15/tips-tricks-judgment-pokemon-rpg-maker-mv/
PS: Does anyone know a good place to relearn this stuff since I'm so rusty?