Okay, so I really need to ask for help from anyone who understands the variable control system.
I have a complicated armor health system using multiple forms of control variables, all to set one called Armor Integrity (or the overall amount of health any piece of armor has at any given time). For now, I set up only a limited function of this system, with triggers being just a static action event and give gold to actor (based on values to see what is working, and what isn't working.)
The variables that matter: <Armor Specific HP> <Actor Armor Integrity Level>
The switches that are used: <Is Armor on/being worn>
The conditional Branches being used: <Is Actor wearing armor>
Initial Variable for "Dress Sphere Type A HP": 10
{This command is a simple test to damage the armor HP and later reduce armor integ}
________________________________________________________________________________________________
Trigger Command Test for Dress Sphere Type A HP Damage:
(Trigger: Action)
Conditional Branch: If Actor Jess is equipped Dress Sphere Type A
> Play Sound
> Control Variable: Dress Sphere Type A HP (-1)
{This should reduce the variable of Dress Sphere Type A HP by one, making it +9, and so on.}
________________________________________________________________________________________________
Test Armor Integrity Level:
Trigger: Action space
> Give gold by variable: == Jess Armor Integrity Value
________________________________________________________________________________________________
________________________________________________________________________________________________
Armor Integrity Checker (This is where I'm having the most trouble)
{Armors have their own HP values determined by the Armor HP variable, which is updated by specific actions, such as the above trigger command for HP armor damage.}
{But Armor integrity as it links to the actor is a separate variable controlling another variable of Dress State and Added or Subtracted Defense (not relevant to this post as that code is currently left out)}
{Armor integtity is supposed to be set to be added to the actor when that armor is equipped, based on the variable value of that armor's HP stat, and subtracted by the same value if unequipped}
{The control switches in the script are designed to prevent looping of adding varaibles when armor is always equipped or when subtracting when always dequipped. In terms of equipping and unequipping the armor to test armor integrity, the script does work!}
{But in terms of editing these values based on how much HP variable is availible, the value does not change.}
________________________________________________________________________________________________
Armor Integrity Checker:
Trigger: (Paralell Process)
> Wait: 60 frames
> Conditional Branch: If Dress Sphere Type A is equipped to actor (Jess)
>> Conditional Branch: If "Is Dress Type A" switch = ON
>
Else
>> Conditional Branch: If "Is Dress Type A" switch = OFF
>> Control Variable: Armor Integrity (Jess) + =(Variable of Dress Sphere Type A HP)
>> Control Switch: "Is Dress Type A" switch = ON
> Branch End
Branch End
Else (Meaning if Dress Sphere Type A is NOT equipped)
> Conditional Branch: If "Is Dress Type A" switch = ON
>> Control Variable: Armor Integrity (Jess) - =(Variable of Dress Sphere Type A HP)
>> Control Switch: "Is Dress Type A" switch = OFF
> Branch end
Control Switch: "Is Dress Type A" switch = OFF
Branch end
________________________________________________________________________________________________
{Note: This set is is a paralell process but not entirely automatic in how Integ is upated. The integrity varaible in this script only gets updated when the character equips or unequips their armor, from the conditional branches of control switches above. I can automate this later, I don't care about it right now. I test with this in mind and ensure equip/dequip cycles before picking up the amount of gold which SHOULD update to match the new armor integrity.}
________________________________________________________________________________________________
The problem: When checking gold with the equipment on Before and After the damage trigger is used, there is no change in the gold added, which is linked to be exactly the current armor integrity of the character. So, Armor integrity is being updated on whether the armor is equipped or not, but not by if it took damage or not. The update should include the factor of damage to armor. I've been ripping my hair out trying to figure this out, change the branches, change the order each action, and nothing. I cannot figure out why this value won't update the armor integrity from armor HP. Anyone willing to look?
I have a complicated armor health system using multiple forms of control variables, all to set one called Armor Integrity (or the overall amount of health any piece of armor has at any given time). For now, I set up only a limited function of this system, with triggers being just a static action event and give gold to actor (based on values to see what is working, and what isn't working.)
The variables that matter: <Armor Specific HP> <Actor Armor Integrity Level>
The switches that are used: <Is Armor on/being worn>
The conditional Branches being used: <Is Actor wearing armor>
Initial Variable for "Dress Sphere Type A HP": 10
{This command is a simple test to damage the armor HP and later reduce armor integ}
________________________________________________________________________________________________
Trigger Command Test for Dress Sphere Type A HP Damage:
(Trigger: Action)
Conditional Branch: If Actor Jess is equipped Dress Sphere Type A
> Play Sound
> Control Variable: Dress Sphere Type A HP (-1)
{This should reduce the variable of Dress Sphere Type A HP by one, making it +9, and so on.}
________________________________________________________________________________________________
Test Armor Integrity Level:
Trigger: Action space
> Give gold by variable: == Jess Armor Integrity Value
________________________________________________________________________________________________
________________________________________________________________________________________________
Armor Integrity Checker (This is where I'm having the most trouble)
{Armors have their own HP values determined by the Armor HP variable, which is updated by specific actions, such as the above trigger command for HP armor damage.}
{But Armor integrity as it links to the actor is a separate variable controlling another variable of Dress State and Added or Subtracted Defense (not relevant to this post as that code is currently left out)}
{Armor integtity is supposed to be set to be added to the actor when that armor is equipped, based on the variable value of that armor's HP stat, and subtracted by the same value if unequipped}
{The control switches in the script are designed to prevent looping of adding varaibles when armor is always equipped or when subtracting when always dequipped. In terms of equipping and unequipping the armor to test armor integrity, the script does work!}
{But in terms of editing these values based on how much HP variable is availible, the value does not change.}
________________________________________________________________________________________________
Armor Integrity Checker:
Trigger: (Paralell Process)
> Wait: 60 frames
> Conditional Branch: If Dress Sphere Type A is equipped to actor (Jess)
>> Conditional Branch: If "Is Dress Type A" switch = ON
>
Else
>> Conditional Branch: If "Is Dress Type A" switch = OFF
>> Control Variable: Armor Integrity (Jess) + =(Variable of Dress Sphere Type A HP)
>> Control Switch: "Is Dress Type A" switch = ON
> Branch End
Branch End
Else (Meaning if Dress Sphere Type A is NOT equipped)
> Conditional Branch: If "Is Dress Type A" switch = ON
>> Control Variable: Armor Integrity (Jess) - =(Variable of Dress Sphere Type A HP)
>> Control Switch: "Is Dress Type A" switch = OFF
> Branch end
Control Switch: "Is Dress Type A" switch = OFF
Branch end
________________________________________________________________________________________________
{Note: This set is is a paralell process but not entirely automatic in how Integ is upated. The integrity varaible in this script only gets updated when the character equips or unequips their armor, from the conditional branches of control switches above. I can automate this later, I don't care about it right now. I test with this in mind and ensure equip/dequip cycles before picking up the amount of gold which SHOULD update to match the new armor integrity.}
________________________________________________________________________________________________
The problem: When checking gold with the equipment on Before and After the damage trigger is used, there is no change in the gold added, which is linked to be exactly the current armor integrity of the character. So, Armor integrity is being updated on whether the armor is equipped or not, but not by if it took damage or not. The update should include the factor of damage to armor. I've been ripping my hair out trying to figure this out, change the branches, change the order each action, and nothing. I cannot figure out why this value won't update the armor integrity from armor HP. Anyone willing to look?