#Right click to launch animation

1 messages · Page 1 of 1 (latest)

errant umbra
#

hello, I am making an Addon and I would like to know, how to ensure that when a player click with a diamond in the hand on an entity, it launches an animation?

#

click to launch animation

rich finch
#

in your anim controller, make a variabke to test if the player is holding a diamond.
ex : variable.hold_diamond = query.is_item_name_any()

and in your rp animation controller, make 2 states that is default and on_hit.

to transition to on_hit, use variable.attack_time > 0.1 && variable.hold_diamond

at on_hit, play the animation that you want to play and then transition back to default using query.any_animation_finished

errant umbra
#

Oh thanks a lot

#

And can we verify when Player right click rather than when he hit the entity ?

rich finch
errant umbra
#

Oh I see, ans how to check when right click on an entity with script ?

rich finch
errant umbra
#

Okay, thanks for your help !

rich finch
#

so you must search for one or create a new forum in #1067535382285135923

errant umbra
#

Okay 👌🏻

errant umbra
#

Right click to launch animation