Skip to content

Repeater entering INVALID state on child runningΒ #2

Open
@crashtheuniverse

Description

@crashtheuniverse

return BH_INVALID;

Is this intended? What I'm seeing is that following this logic, the Repeater as soon as one of the children is in running phase, will return INVALID as it's status.

This will in turn go back to the base class Behavior that will see that the status != RUNNING, and terminate the behavior.
Since the implementation of a basic Repeater has an empty ::onTerminate seems like nothing is effected if that's a top level node. However the side effects show as soon as it is used to repeat a set of actions further down the tree.

Shouldn't it return a RUNNING state instead?

Maybe I'm misinterpreting the intended behavior, as we want the action to be repeated quickly in the same frame / context?
One of the examples from the aigamedev paper says "shootPlayer" 3 times. If that is a sequence in itself, (like imagine an old sniper rifle: reload, aim, shoot, reload, aim, shoot..) each phase may have a short running period.
If that's not how it is intended ok, but otherwise I see that as a potential problem.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions