Actions between waypoints

matmalm

Member
Hi.
I have an NPC which usually patrols an area, and sometimes when it's going from point A to point B there is a door in between. For the NPC to open the door I use the Interact ability. However, I'd like it to stop the NPC from patrolling while the ability is active (Is Ability Active task). But if the active branch where the Patrol task is, moves to the "Is Ability Active" task branch, then the NPC goes to another waypoint when the task returns success and the Patrol branch is active again.
Should I modify the Patrol task or is there a bult in way to do this?
 
This sounds like the perfect situation for the Interrupt/Perform Interruption tasks. Place the Interrupt Decorator above your Patrol task, and when the ability is active you run Perform Interruption.
 
This sounds like the perfect situation for the Interrupt/Perform Interruption tasks. Place the Interrupt Decorator above your Patrol task, and when the ability is active you run Perform Interruption.
I get the same result.
When the Agent is going from Waypoint A to Waypoint B, and there is a door in between, the Interact ability is active and it interrupts the Patrol, however when it goes back to the Patrol task it goes to another Waypoint, skipping Waypoint B.
 
Ah, when the patrol task restarts it will always either resume from the first waypoint or random if that option is selected. If you want it to resume the previous target you'll need to create a new patrol task or modify the existing task.
 
Back
Top