For context, I am coding a naive implementation of behavior trees myself, in C#. Let's say I have two scenarios that I want to create behaviors for. Both AI's will traverse/patrol four specific locations (markers), in order, and then repeat the path.
AI 1) Upon seeing the player, freeze. Once the player is out of sight, begin patrolling again, but from the very first marker (i.e. restart).
AI 2) Upon seeing the player, freeze. Once the player is out of sight, begin patrolling again, but from whatever marker it was previously on before being interrupted by the player (i.e. carry on).
I would expect both of these behaviors to be modeled by first checking for the player, and if that fails proceeding further down to a Sequence node that contains four children, each being a "traverse to maker" behavior.
In other words -> after a behavior is interrupted by a node higher up the tree, how do I retain the current place in a sequence and carry on when we finally make it back down the tree again?