Solved Bow pullback

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Hackusater

Active Member
Aug 5, 2017
74
2
8
34
Hello, I am trying to make a skript that only works when a bow is pulled back all the way.
code_language.skript:
on shoot:
    if projectile is arrow:
#        if bow is pulled back all the way:
            send "It works" to player
How would I check if the bow is pulled back all the way?
 
I would say that you should time exactly how long it takes for the bow to be at full draw after rightclicking with it. Set a variable {drawtime} to whatever timespan you get from that measurement. Then, every time a player rightclicks with a bow, set a variable {bowdraw.%player%} to the current time. From there, you can do this:

code_language.skript:
on shoot:
    if projectile is arrow:
        if difference between now and {bowdraw.%shooter%} is greater than {drawtime}:
            send "It works" to shooter

Because of how "is greater than" works, you want want to subtract a tick or so from the draw time variable.

Hope this helps, don't have time to implement it myself so I'm not certain this would work.
 
I would say that you should time exactly how long it takes for the bow to be at full draw after rightclicking with it. Set a variable {drawtime} to whatever timespan you get from that measurement. Then, every time a player rightclicks with a bow, set a variable {bowdraw.%player%} to the current time. From there, you can do this:

code_language.skript:
on shoot:
    if projectile is arrow:
        if difference between now and {bowdraw.%shooter%} is greater than {drawtime}:
            send "It works" to shooter

Because of how "is greater than" works, you want want to subtract a tick or so from the draw time variable.

Hope this helps, don't have time to implement it myself so I'm not certain this would work.
Good Idea, I have never thought about doing this. Thank you!
 
  • Like
Reactions: Gladrian
Status
Not open for further replies.