News Forums RAIN General Discussion and Troubleshooting Stop Animation after once through

This topic contains 3 replies, has 2 voices, and was last updated by  jahshuwuh 2 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34839

    jahshuwuh
    Participant

    In my BT below my model walks a waypointpath once, then at the end of the path starts shooting and continues shooting until he is clicked on. At this point he should play his “death” animation once and be done, however the death animation loops. So I need some way to escape that animation. The animation is set on “Once” and not “Loop” in the Animation window also, but that didn’t see to make a difference. Any advice?

    #34840

    jahshuwuh
    Participant

    I’ve also tried this way.

    #34844

    prime
    Keymaster

    The likely problem is that your behavior tree loops after it completes. If you want the BT to stop running the try something like

    SELECTOR (root)
    — EVALUATE EXPRESSION “dead == true” REPEAT UNTIL FAILURE
    — YOUR PARALLEL GOES HERE
    — — SEQUENCER (this is where your death animation happens)
    — — — ANIMATION death
    — — — EVALUATE EXPRESSION “dead = true”

    #34849

    jahshuwuh
    Participant

    Thanks, got it to work with your logic. Here’s a screen shot of the working script if it’ll help any newcomers.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.