Jump to content

Arrows that can't be picked up?


DomyTheCat

Recommended Posts

Hi, im making a wand that shoots an arrow whenever you right click, but the player can pick up the arrows it throws, how can i make it so you cant pick up the arrows? i dont want the players infinitely farming arrows with that. heres my code:

on right click:
    if player's tool is stick named "&cArrow Wand":
        if {arrowWandLastUsed.%player's uuid%} is not set:
            set {arrowWandLastUsed.%player's uuid%} to now
        set {_diff} to difference between now and {arrowWandLastUsed.%player's uuid%}
        if {_diff} is less than 0.5 seconds:
            send action bar "&4Arrow on cooldown!" to player
        else:
            send action bar "&aArrow shot!" to player
            shoot arrow from player with speed 5
            set {_arrow} to last shot projectile
            set {arrowWand::%{_arrow}'s uuid%} to true
            play sound "entity.arrow.shoot" with volume 1 and pitch 1 at player's location
            set {arrowWandLastUsed.%player's uuid%} to now

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...