Jump to content

Recommended Posts

@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

Hello, this is sample code with defaut condition:

GoToTask.ToPosition(Vector3.Zero, 3.5f, false, context => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Conditions.IsAttackedAndCannotIgnore);

 

Link to comment
https://wrobot.eu/forums/topic/9769-gototask-conditionexit/#findComment-45564
Share on other sites

  • 4 years later...

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...