Prioritize a animation if you request to play two animation

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By thoma

Hi I make a reload animation and now I want to make something will tell to the player if reload animation start playing DO NOT PLAY SHOOT ANIMATION! Thank for helping me

:bust_in_silhouette: Reply From: Kaligule

You could do it like this:

var reloading = false

func shoot():
    if not reloading:

func reload():
    reloading = true
    reloading = false

Now you can shoot and reload as much as you want, but the reloading won’t be disturbed by shooting.

Thank you very munch

thoma | 2019-07-04 22:46

Your welcome. Did it solve your problem?

Kaligule | 2019-07-06 05:59

That totally solve my promblem

thoma | 2019-07-06 16:08