1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Fire arrow via code

Discussion in 'Development' started by minijaham, Nov 2, 2020.

  1. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Hello, I've been trying to make a command that fires an arrow. However, all the previous attempts didn't seem to work.

    Any ideas? :D
     
  2. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    1. Create Arrow entity
    2. Add motion to it (if you want to shoot it as from bow you can multiply Player->getDirectionVector())
    3. Spawn it to everyone
     
    IvanCraft623 likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.