[Bug]elapsedTime property in ActionTask class always stay zero

NodeCanvas Forums Support [Bug]elapsedTime property in ActionTask class always stay zero

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12673
    kypronite
    Participant

    hi admin,

    When I try to use Wait Action, I noticed elapedTime always is 0 even when it is running.
    The same when I create my own custom action.
    I debug elapedTime property from OnUpdate() and it keep showing 0.

    I’m using latest nodecanvas asset(ie:imported asset this monday)

    thanks.

    #12678
    Gavalakis
    Keymaster

    Hello,

    Hmm. Is by any chance the Graph Paused, or you have set Time.timeScale to 0 by any means?
    I can’t really reproduce Elapsed Time not being updated correctly here and seems to works fine.

    If neither of the above is the case and you still experience this issue, could you please send me a small reproduction project to “support_AT_paradoxnotion.com” ?

    Let me know.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    #12682
    kypronite
    Participant

    Hi,

    I managed to recreate again.
    But I’m not sure if this because of my node design(I’m still learning) ….

    You can see below screenshot, startedTime and Time.time always same value hence elapsedTime is always 0

    not-working-if-pressed-space

    but if I disconnected from press space condition, the wait time is working as expected

    working-if-pressed-space-disconnnected

    If this is a bug and you cant reproduce on your side, I will send you my project about 56 mb size.

    thanks for looking into this.

    Attachments:
    You must be logged in to view attached files.
    #12691
    Gavalakis
    Keymaster

    Hello again,

    Thanks for the screenshots.
    I can understand the confusion now. 🙂

    Because you are using a Parallel, all it’s child nodes are always executed. Because though, the Parallel is set to return on “First Success Or Failure” and the condition on the right side, is indeed returning Failure, that means that the Action on the left, is immediately interrupted even though it still get’s the chance to execute for 1 frame because it is a child (even if indirect) of the Parallel node. But it still gets interrupted on that same frame.

    If you want to just always run the child nodes of the Parallel regardless of what they return, then probably a good way to do this, would be to Decorate the condition on the right withe “Optional” Decorator, and as such the Parallel will not care for what status that condition returns.

    Please let me know if that clarifies why this is happening, or not 🙂
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    #12709
    kypronite
    Participant

    thanks is working now.
    I knew there some problem with how i design my node.
    I think the problem i always see tree linearly top bottom (ie: parent to child)
    hence the confusion on my part:)

    #12710
    Gavalakis
    Keymaster

    Thanks for the follow up!
    I am glad it’s working for you now 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.