network-script-data icon indicating copy to clipboard operation
network-script-data copied to clipboard

No IterationsPerArrow

Open Rorkh opened this issue 2 years ago • 2 comments

Don't will be better solution for arrow traces to do such thing in listed below way instead of fixed number repeat?

# Just for reference
bow_modifiers_handler:
    type: world

    events:
        on player shoots bow:
            - ratelimit <player> 1s

            - flag <context.projectile> is_flying:true

            - wait 1t

            - while true:
                - if !<context.projectile.is_spawned>:
                    - stop
                - if !<context.projectile.has_flag[is_flying]>:
                    - stop

                - playeffect redstone at:<context.projectile.location> quantity:5 offset:0.25 special_data:2|red targets:<player.world.players>
                - wait 1t
        after arrow hits *:
            - flag <context.projectile> is_flying:!

Rorkh avatar Sep 15 '22 13:09 Rorkh