I'm making fire spells for my game and I want them to burn the user a little bit if they're not wearing the right equipment to deal with the fire. I've been researching the topic but I couldn't find a way to damage an enemy and the user. I'm new to all of this so I might just be a little dumb.
Spells that damage the user on use when not wearing right equipment
RPG Maker MZ SupportI don't know exactly know how you want to implement it, but consider the steps below:
1- create a common event that detect the items equipped by the player
2- creating another common event (or use the same as 1-) that deals damage to the player
3- create a skill that uses the common events 1- and 2-
4- you might need to use javascript
5- if you don't use javascript you could detect the items including equipped items and also detect the items not including equipped, based on that you can deduce if the item is equipped.
I hope this helps.
1- create a common event that detect the items equipped by the player
2- creating another common event (or use the same as 1-) that deals damage to the player
3- create a skill that uses the common events 1- and 2-
4- you might need to use javascript
5- if you don't use javascript you could detect the items including equipped items and also detect the items not including equipped, based on that you can deduce if the item is equipped.
I hope this helps.
I'm not sure why @oreh suggests the possibility of breaking steps 1 and 2 into separate common events. If you were going to go the common event route, you should just put all of that into one event.
Aside from that, you could do it that way.
You could also use code attached to the skill - if you have VisuStella's Battle Core, you could use a JS Post-Damage As User tag to see whether the actor is wearing the correct equipment and damage them if not.
Aside from that, you could do it that way.
You could also use code attached to the skill - if you have VisuStella's Battle Core, you could use a JS Post-Damage As User tag to see whether the actor is wearing the correct equipment and damage them if not.
Although it's not the #1 recommended method of doing so, if you're not using autobattle in your game at all you could also incorporate this directly into the damage formula.
Original thread: https://forums.rpgmakerweb.com/threads/spells-that-damage-the-user-on-use-when-not-wearing-right-equipment.154171/