Hello,
Is it possible to tell if a branch has been interrupted, and if it had, perform a task/run some code before it enters the new branch? Essentially, I have a branch which dequeues a game "task" from an object, this tells the NPC which resources it needs to go find and only one NPC can have this game task at a time. However if the branch gets interrupted by a conditional abort, by for example if it gets attacked by an enemy or numerous other reasons, I need to be able "reset" this game task so the gameobject can reassign it to a different NPC. But as far as I can tell, I can't infer if a branch has been interrupted in order to be able to do this.
Any ideas how to get around this? Or do I need to rethink my logic?
Thanks,
Elliott
Is it possible to tell if a branch has been interrupted, and if it had, perform a task/run some code before it enters the new branch? Essentially, I have a branch which dequeues a game "task" from an object, this tells the NPC which resources it needs to go find and only one NPC can have this game task at a time. However if the branch gets interrupted by a conditional abort, by for example if it gets attacked by an enemy or numerous other reasons, I need to be able "reset" this game task so the gameobject can reassign it to a different NPC. But as far as I can tell, I can't infer if a branch has been interrupted in order to be able to do this.
Any ideas how to get around this? Or do I need to rethink my logic?
Thanks,
Elliott