The same action is executed twice in one Tick when TaskExecutionType=NoDuplicates

ffbh

Member
I enabled "Log Task Changes":



11.31619: Alead - People: Push task Until Failure (BehaviorDesigner.Runtime.Tasks.UntilFailure, index 124) at stack index 0
UnityEngine.MonoBehaviourPrint (object)
BehaviorDesigner.Runtime.BehaviorManagerPushTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1406)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1302)
BehaviorDesigner.Runtime.BehaviorManager:RunParentTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int&,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1375)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1311)
BehaviorDesigner.Runtime.BehaviorManager:RunParentTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int&,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1375)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1311)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1127)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.Behavior) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1073)
Core.Automation.SharedVariables.Creature`2<Core.Object.Prefab.CitizenPrefab, Common.Database.Data.CitizenRecord>:TickBehaviorTree () (at Assets/Scripts/Core/Automation/SharedVariables/Creature.cs:90)




11.31619: Alead - People: Push task Creature Attack (Core.Automation.Action.CreatureAttack, index 125) at stack index 0
UnityEngine.MonoBehaviourPrint (object)
BehaviorDesigner.Runtime.BehaviorManagerPushTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1406)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1302)
BehaviorDesigner.Runtime.BehaviorManager:RunParentTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int&,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1375)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1311)
BehaviorDesigner.Runtime.BehaviorManager:RunParentTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int&,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1375)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1311)
BehaviorDesigner.Runtime.BehaviorManager:RunParentTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int&,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1375)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1311)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1127)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.Behavior) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1073)




It is the first time my custom action is executed.
 
13.87306: Alead - People: Pop task Creature Attack (Core.Automation.Action.CreatureAttack, index 125) at stack index 0 with status Success
UnityEngine.MonoBehaviourPrint (object)
BehaviorDesigner.Runtime.BehaviorManagerPopTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus&,bool,bool) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1448)
BehaviorDesigner.Runtime.BehaviorManagerPopTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus&,bool) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1423)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1322)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1127)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.Behavior) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1073)




13.87306: Alead - People: Push task Creature Attack (Core.Automation.Action.CreatureAttack, index 125) at stack index 0
UnityEngine.MonoBehaviourPrint (object)
BehaviorDesigner.Runtime.BehaviorManagerPushTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1406)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1302)
BehaviorDesigner.Runtime.BehaviorManager:RunParentTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int&,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1375)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1311)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1127)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.Behavior) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1073)




It is the second time my custom action is executed




13.87306: Alead - People: Pop task Creature Attack (Core.Automation.Action.CreatureAttack, index 125) at stack index 0 with status Success
UnityEngine.MonoBehaviourPrint (object)
BehaviorDesigner.Runtime.BehaviorManagerPopTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus&,bool,bool) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1448)
BehaviorDesigner.Runtime.BehaviorManagerPopTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus&,bool) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1423)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1322)
BehaviorDesigner.Runtime.BehaviorManager:RunParentTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int&,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1375)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1311)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1127)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.Behavior) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1073)




14.19143: Alead - People: Push task Creature Attack (Core.Automation.Action.CreatureAttack, index 125) at stack index 0
UnityEngine.MonoBehaviourPrint (object)
BehaviorDesigner.Runtime.BehaviorManagerPushTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1406)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1302)
BehaviorDesigner.Runtime.BehaviorManager:RunParentTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int&,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1375)
BehaviorDesigner.Runtime.BehaviorManager:RunTask (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree,int,int,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1311)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.BehaviorManager/BehaviorTree) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1127)
BehaviorDesigner.Runtime.BehaviorManager:Tick (BehaviorDesigner.Runtime.Behavior) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:1073)




15.03834: Disabling Alead - People
UnityEngine.Debug:Log (object)
BehaviorDesigner.Runtime.BehaviorManagerDisableBehavior (BehaviorDesigner.Runtime.Behavior,bool,BehaviorDesigner.Runtime.Tasks.TaskStatus) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:914)
BehaviorDesigner.Runtime.BehaviorManagerDisableBehavior (BehaviorDesigner.Runtime.Behavior,bool) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:888)
BehaviorDesigner.Runtime.BehaviorManagerDisableBehavior (BehaviorDesigner.Runtime.Behavior) (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:883)
BehaviorDesigner.Runtime.BehaviorManager:OnApplicationQuit () (at Assets/Plugins/Behavior Designer/Runtime/BehaviorManager.cs:302)
 
My custom action returns 'Success' and is executed twice in one tick. When it returns 'Running,' it executes only once per tick.
 
It depends on your tree but this isn't unusual - maybe the parent task is causing it to rerun upon success? No duplicates just specifies that it must make it through the entire tree without running again.
 
The parent task is the 'Until Failure'. Why does it make my action rerun twice in one tick instead of continuing to rerun indefinitely when it returns Success in the same Tick?
 
It really depends on the tree but if your child task doesn't return failure then there's a chance that it could be run again. One debugging technique is to disable all of the nodes and slowly enable them again until you see what task is causing it to rerun. It could also be the tick rate - are you manually ticking the tree? If so then you could be ticking it twice.
 
Back
Top