#Sound delay

1 messages · Page 1 of 1 (latest)

forest patrol
#

how to reduce the delay of playing a sound when I'm attacking using my custom item?

here is the code

    "initial_state": "default",
    "states": {
        "default": {
            "transitions": [
                {
                    "swing": "query.get_equipped_item_name('main_hand') == 'shovel' && variable.attack_time > 0.0"
                }
            ]
        },
        "swing": {
            "transitions": [
                {
                    "default": "!variable.attack_time > 0.0"
                }
            ],
            "on_exit": [
                "/playsound shovel.swing @s"
            ]
        }
    }
}```
north vault
#

Play it on entry instead of on exit

forest patrol
#

hello there! it somehow managed to reduce the delay but there is still some sort of delay but thanks!

eager yoke