Topic: Highlight On Armor Attack
Hello.
I'm trying to make a character glow like they glow when the character makes a parry but now when my character is making a move and the attack has armor.
I tried this from what I know
on BattleGUI.cs inside OnHit
if (move.armorOptions.hitAbsorption > 0) {
Debug.Log ("Armor");
int Player = player == this.player1.character ? 1 : 2;
ControlsScript armorControlsScript=UFE.GetControlsScript(Player);
UFE.config.blockOptions.parryColor = Color.green;
armorControlsScript.HighlightOn(armorControlsScript.gameObject,true);
But sometimes it sends me this error
NullReferenceException: Object reference not set to an instance of an object
BattleGUI.OnHit (.HitBox strokeHitBox, .MoveInfo move, .CharacterInfo player) (at Assets/UFE/Scripts/UI/Base/BattleGUI.cs:143)
UFE.FireHit (.HitBox strokeHitBox, .MoveInfo move, .CharacterInfo player) (at Assets/UFE/Scripts/UFE.cs:1181)
ControlsScript.GetHit (.Hit hit, Int32 remainingFrames, Vector3 location) (at Assets/UFE/Scripts/ControlsScript.cs:1951)
ProjectileMoveScript.DoFixedUpdate () (at Assets/UFE/Scripts/ProjectileMoveScript.cs:204)
UFE.FixedUpdate () (at Assets/UFE/Scripts/UFE.cs:1658)
Can someone give a hint about what am I doing wrong?
Thanks you for your help