Matenia 628 Posted July 14, 2018 Share Posted July 14, 2018 @Droidz can you explain a little how this works? I built my own helper function, because it doesn't seem to work the way I want ti to. Basically I want GoToTask to abort if Conditions.IsAttackedAndCannotIgnore and a bunch of other stuff evaluates to true. But it seems to instantly cancel, if it evaluates to false, so I don't really understand. Link to comment https://wrobot.eu/forums/topic/9769-gototask-conditionexit/ Share on other sites More sharing options...
Droidz 2738 Posted July 14, 2018 Share Posted July 14, 2018 Hello, this is sample code with defaut condition: GoToTask.ToPosition(Vector3.Zero, 3.5f, false, context => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore); Matenia 1 Link to comment https://wrobot.eu/forums/topic/9769-gototask-conditionexit/#findComment-45564 Share on other sites More sharing options...
Weer36 3 Posted June 23, 2023 Share Posted June 23, 2023 Sorry for necropost, but anybody used subj? It's no difference in GoToTask behavior: GoToTask.ToPosition(pos, 3.5f, false, context => true); and GoToTask.ToPosition(pos, 3.5f, false, context => false); in both cases bot successfully runs until reaches destination and ignores fight during run. How to correct use GoToTask.ToPosition with interrupting when bot attacked? Link to comment https://wrobot.eu/forums/topic/9769-gototask-conditionexit/#findComment-68432 Share on other sites More sharing options...
Droidz 2738 Posted June 24, 2023 Share Posted June 24, 2023 15 hours ago, Weer36 said: Sorry for necropost, but anybody used subj? It's no difference in GoToTask behavior: GoToTask.ToPosition(pos, 3.5f, false, context => true); and GoToTask.ToPosition(pos, 3.5f, false, context => false); in both cases bot successfully runs until reaches destination and ignores fight during run. How to correct use GoToTask.ToPosition with interrupting when bot attacked? Hello, I'm supprise that with => false method move the character. To interrupting when bot attacked use GoToTask.ToPosition(pos, 3.5f, false, context => !Conditions.IsAttackedAndCannotIgnore); Link to comment https://wrobot.eu/forums/topic/9769-gototask-conditionexit/#findComment-68439 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now