I have two helmet's, one with an open visor and one with a closed visor. What I'm trying to achieve is the illusion of the visor opening/closing when the player draws/sheathes their weapon.
I have a script attached to both helmets that OnEquipped() adds an ability to the player, then OnUnequipped() removes said ability
The ability is just a copy of one of the vanilla abilities, with one magic effect. This magic effect has "No duration" and "No UI" checked and contains one script that basically tracks using animation events when the player draws/sheathes their weapon and switches the helmets accordingly.
It works...to a degree
In the EffectScript's OnAnimationEvent() event i do EquipItem(newHelmet) followed by RemoveItem(oldHelmet).
Now the removeItem() still sends a OnUnequipped() event to the helmet thereby removing the ability. The problem is when the new helmet is added by EquipItem() it doesn't receive the OnEquipped() event so my ability never gets re-applied.
I confirmed that the rest of the script is working by manually adding the ability using the console after the switcheroo happens
What I need is an event that I can add to the helmet script that still gets called if the helmet was added by EquipItem so that I can re-apply my ability
Thanks in advance
- Hypno