x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[Closed] BTDecorator::OnBecomeRelevant doesn't get called unless observer aborts is set

So I'm making a decorator that does not have conditional logic, so I dont need the observer abort rules really. OnBecomeRelevant and OnCeaseReleveant, should be called when the task I'm attached too becomes active? It seems without the abort rule set, the three doesn't know that it needs to update that decorator. Is this the desired behavior? It seems like an unneeded constraint.

Product Version: Not Selected
Tags:
more ▼

asked Jun 18 '16 at 07:15 PM in Using UE4

avatar image

Answers.Archive STAFF
1.9k 202 311 682

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed Jun 18 '16 at 07:16 PM by AndrewHurley for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

Hey Troy,

Have you tried setting bNotifyBecomeRelevant to true in your custom decorator class?

Cheers,

--mieszko

more ▼

answered Jun 18 '16 at 07:16 PM

avatar image

Answers.Archive STAFF
1.9k 202 311 682

avatar image Answers.Archive STAFF Jun 18 '16 at 07:16 PM

This flag is only for gating virtual call ;)

Become/CeaseRelevant events are used only with aborting decorators, because it doesn't have to match "branch is active" rule. E.g. decorators in "abort lower priority" mode are relevant only when their branch is not executing, but lower priority ones are.

Check OnNodeActivation and OnNodeDeactivation (with proper bNotify gate flags). They fire with search flow, not branch execution, but maybe this will be enough. If this approach gives too many false positives (search flow enters and leaves branch without executing anything) you'll probably need to use service.

avatar image Answers.Archive STAFF Jun 18 '16 at 07:16 PM

Yeah, I had the flags set. Thanks for the info Lukaz, it seemed like something with execution. I'd use a service, but I can only put them on composite nodes. So that isn't going to help me much.

Ok thanks.

avatar image Answers.Archive STAFF Jun 18 '16 at 07:16 PM

Does tick have the same rules?

avatar image Answers.Archive STAFF Jun 18 '16 at 07:16 PM

Unfortunately it does. Only actively observing decorators will get one.

You can make a decorator locked in "abort self" (like TimeLimit) mode with always passing condition as a workaround before 4.12 adds services on tasks. It will be active with the branch and receive all updates you want.

avatar image Answers.Archive STAFF Jun 18 '16 at 07:16 PM

So, something like this:

FlowAbortMode = EBTFlowAbortMode::Self;

And this will make sure become and cease are always called? If true, this is a fine workaround until 4.12.

avatar image Answers.Archive STAFF Jun 18 '16 at 07:16 PM

Pretty much. You can clear both bAllowAbortLowerPri and bAllowAbortNone flags to prevent changing this mode from editor too.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question