Ok so im having an issue where by about 80% of the time this works.
Some times it works perfectly and some times one or 2 NPCs fail to enter branch when they are shot.
to simplify teh behind scnes logic the ATtack target key is set in the combat overide when they are shot. however they arnt leaving the Mission / other branches.
The combat decorator kicks in and copmbat hapens. However despite the AttackTargetKey geting set and displaying as set (visible at top) the combat nodde isnt kicking in.
logs are showing a the target is valid and asigned.
LogTemp: CombatOverride: Switching to self-defense target for BP_Ship2_C_UAID_BCFCE76666E6B77202_1894520091: BP_Ship6_C_0
LogTemp: CombatOverride: Keeping self-defense valid target for BP_Ship2_C_UAID_BCFCE76666E6B77202_1894520091: BP_Ship6_C_0
The second log reads the blackboard key.
On further investigation
whats even more odd that despite that login out on tick as beingg valid iv also been observing the combat mode kiking in for aprox a second or 2 then the branch switching back to the mission logic despite the key being set.
Iv tried this with an is set decorator and the same thign happens.
I suggest to debug deeply combat variables changes after Selector chooses this combat child.
As you mentioned before, selector "Combat Override " is checking every 0.6 sec
and after some variable changes Combat is not being choosed becouse of choosing requiments are not fulfilled.
The source of the Issue must be withing some delay variable change function or events that stops from entering combat child node
yeah,I mean the combat decorator not the further down. Since Sellector runs from left to right.
On the picture above , I see that combat is being checked and requirments are not met. Then mission logic is being choosen.
Also sometimes if mission Logic exited with success . It may not allow other selectors to be in use. I twill stays its loop forever
Thanks alot that was probbly very helpfull, I belive there may be an issue with the select attack type code.
After rechecking keys it would seam that the attack mode was potentialy being set to a value that dosent exist/shouldnt be being set to. therfore the combat chain is not reaching an end point.
Iv added anothre node onthe right using that value and am testing this hypothsis.
Thank you very much for your assistance, who knows when id of solved it if you hadent said that. if I remember by then end of this project youll be geting an honorable mention.
Fairly new to behavour tress past project have all been hard coded and youv expanded my knowldge on trouble shooting them.
It would apear that some how attacks were added to the ships capabilitys / pilot (that shouldnt be in them) that are not in the tree for fighteres to use.
This means that it would not reach an end point in the combat. i have removed those attak types fro mthe ship and it apears to be functinoing properly again. ill have to put in some sort of fall back in case this issue hapens again to prevent things geting stuck.
Im marking this as solved for now at least unless my testing period i just got realy lucky and the bugg didnt present.