How to detect when an armor brokes?

Started by Stilanc on Thu, 06/15/2017 - 17:47

Topic category: Advanced modding

Last seen on 16:58, 17. Jun 2017
Joined Jun 2017
User points:


  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How to detect when an armor brokes?
Thu, 06/15/2017 - 17:47

Hello everyone,

I'm working on a Saint Seiya armor mod and I would like to add an event, which would be triggered when the Cloth breaks.

This event would add an item (a broken Cloth) to the player's inventory and would display "The (Constellation) (Part of the Armor) is broken!"

So in the code, I have been thinking to check if the durabilty value is zero, but I can't find the name of the variable.

So my question is : How can I detect when a part of the armor breaks?

Thanks for your answer!