Groot icon indicating copy to clipboard operation
Groot copied to clipboard

Simple Condition

Open JonasTietz opened this issue 5 years ago • 4 comments

Hi, this is not really an issue, but I think it would be a nice feature, which would get rid of some redundant work. I would like to be able to create an condition node in Groot were I could just specify a boolean in the blackboard to check if it is true or false. Right now I always write a very simple function and use the registerSimpleCondition call with the port list.

JonasTietz avatar Apr 02 '19 21:04 JonasTietz

Hi,

it make sense. I will work on that

facontidavide avatar Apr 02 '19 22:04 facontidavide

@JonasTietz Have you tried using the BlackboardCheckString decorator? It should be able to do a similar behavior. You could specify the port as value_B, TRUE or FALSE as value_A and FAILURE as desired NodeStatus with return_on_mismatch.

hlzl avatar Apr 05 '19 12:04 hlzl

No I did not consider that. Correct me if I am wrong, but I would still need an node, which would always return success and is not a decorator, because a decorator always needs a child. I think that it would be a bit hacky. But otherwise it seems like an valid workaround for now.

JonasTietz avatar Apr 05 '19 12:04 JonasTietz

Correct me if I am wrong, but I would still need an node, which would always return success and is not a decorator, because a decorator always needs a child. I think that it would be a bit hacky. But otherwise it seems like an valid workaround for now.

I agree, it is a bit hacky, especially when you need an extra child. I only use it when I have an action and want to check a related condition beforehand. In this case, you can put it right in front of the action node.

hlzl avatar Apr 05 '19 13:04 hlzl