Change Speed Task does not always return successful, why?

doublet1992223

New member
uestion regarding start/stop ability ---> speedchange. I want to use this task to enable running of my UCC character. However, I find this task does not always fire successfully. Why?


1675441702629.png


My tree is designed as follows: On detecting the player, The AI starts running(1st start stop ability) and seeks the target get by the "can see object" task. Then the AI starts Aim(2nd start stop ability) and attack(start stop use). Followed by a wait. Then, if the player gets far away, the sequence stops and go to another branch. (I know I can do a lot to optimise this tree). However, my problem is that sometimes the 1st start stop ability does not return successful, and the running does not happen. I wonder how that happen? In what condition that task could return failure?
 
My best recommendation is to set a breakpoint within SpeedChange.CanStartAbility and see why it's returning failure. If it doesn't make it that far then you should set a breakpoint within UltimateCharacterLocomotion.TryStartAbility. Let me know the line that it returns false on and I can tell you what may cause that.
 
My best recommendation is to set a breakpoint within SpeedChange.CanStartAbility and see why it's returning failure. If it doesn't make it that far then you should set a breakpoint within UltimateCharacterLocomotion.TryStartAbility. Let me know the line that it returns false on and I can tell you what may cause that.
Sorry I'm not very familiar with how to set a breakpoint in c#, I will try to figure that out.

However, while I'm trying to debug that, I suggest maybe you can look at the demo scene provided in the integration(UCC&BD). In the demo scene, the start/stop ability-speed change does not always successfully fire as intended and the enermy atlas just walk instead of run. The only reason why the sequence still work is that start/stop ability-speed change task is checked as "always return successful".

Actually, If I make a brand new UCC character and design a behavior tree just include a simple sequence : start/stop ability-speed change ——> seek. The start/stop ability-speed change task could return failure.
 
My best recommendation is to set a breakpoint within SpeedChange.CanStartAbility and see why it's returning failure. If it doesn't make it that far then you should set a breakpoint within UltimateCharacterLocomotion.TryStartAbility. Let me know the line that it returns false on and I can tell you what may cause that.
Just figure that out: In Speed Change there's a "Require Movement" check box. That's what preventing the tast to return success
 
Top