GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

how to activate a behavior after another behavior has finished?

I have an ammo clip (6 bullets one next to each other using Replicate) attached to a "clip" integer. Pressing the reload btn starts an interpolate behavior so that the clip will refill gradually.
By creating a boolean "loading" i can condition the fire btn NOT to work while the reload is happening.

Now, i want the "loading" boolean to revert back to false only AFTER the interpolation has finished

How can i detect "on completion"?

Comments

  • SocksSocks London, UK.Posts: 12,822Member

    @shylevari said:
    I have an ammo clip (6 bullets one next to each other using Replicate) attached to a "clip" integer. Pressing the reload btn starts an interpolate behavior so that the clip will refill gradually.
    By creating a boolean "loading" i can condition the fire btn NOT to work while the reload is happening.

    Now, i want the "loading" boolean to revert back to false only AFTER the interpolation has finished

    How can i detect "on completion"?

    Have a rule that triggers when the interpolation value has been reached.

    So if you are interpolating X to 44 then your rule would be . . .

    When X = 44 . . .

  • shylevarishylevari Posts: 16Member

    So it's not just "if" - it is "whenever" this rule is met?
    I thought it was only on the first time the rule is met :)

  • SocksSocks London, UK.Posts: 12,822Member

    @shylevari said:
    So it's not just "if" - it is "whenever" this rule is met?

    It is 'when'.

Sign In or Register to comment.