Syntax for tipped arrows?

  • 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 community!

    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.

Tryhqrd

Member
Jan 3, 2021
2
1
3
Pretty much title. I was hoping to add these to my SMP, and their intended function should be pretty clear.

on rightclick holding a tipped arrow of poison:
player is sneaking
remove 1 tipped arrow of poison from the player
play sound "entity.arrow.shoot" with volume .5 at the player
make the player shoot a tipped arrow of poison at speed 2

upload_2021-1-2_21-4-31.png

After reloading this script, the game seems to only be confused over the portion of the effect that is intended to fire the arrow. It is not confused about the part that instructs it to remove the arrow from the player's inventory, nor does it look to be conflicted over the event.


on load:
register new shaped recipe for 8 tipped arrow of nausea using arrow, arrow, arrow, arrow, pufferfish, arrow, arrow, arrow, arrow


Loading a variation of this script (except with poison arrows instead of nausea) works perfectly well. I assume this version does not work because it involves an arrow that does not actually exist within the game. Would it be possible to make a custom crafting recipe for an arrow like this? Perhaps with a Skript addon? I'm relatively new at this, so any help would be much appreciated. Thanks :emoji_slight_smile:
 
try make player instead of make the player
[doublepost=1609753423,1609753311][/doublepost]or try "shoot tipped arrow of poison at speed 2"
 
I have screwed around with it a bit, and noticed that the "of poison" part of the code is screwing it over. If you remove the "of poison" part, it will shoot the arrow, but the arrow particles will be blue becouse the arrow has no effect. As soon as you add the "of posion" part to it, it wont understand what you want. It will remove the arrow, just wont shoot the arrow. (Tipped arrow of Splashing, just like you would trow a splash potion without effect)

Also, is it correct the arrow issn't getting removed from the players inventory when the player is in creative?

This code will make the player shoot the arrow, without effect though:

Code:
on rightclick holding a tipped arrow of poison:
    player is sneaking
    remove 1 tipped arrow of poison from the player
    play sound "entity.arrow.shoot" with volume .5 at the player
    make the player shoot tipped arrow at speed 2
 
Last edited:
I have screwed around with it a bit, and noticed that the "of poison" part of the code is screwing it over. If you remove the "of poison" part, it will shoot the arrow, but the arrow particles will be blue becouse the arrow has no effect. As soon as you add the "of posion" part to it, it wont understand what you want. It will remove the arrow, just wont shoot the arrow. (Tipped arrow of Splashing, just like you would trow a splash potion without effect)

Also, is it correct the arrow issn't getting removed from the players inventory when the player is in creative?

This code will make the player shoot the arrow, without effect though:

Code:
on rightclick holding a tipped arrow of poison:
    player is sneaking
    remove 1 tipped arrow of poison from the player
    play sound "entity.arrow.shoot" with volume .5 at the player
    make the player shoot tipped arrow at speed 2

Sorry for the super late reply, I totally forgot. I guess this thread could use a bump, anyway. At the time that I'd originally written this post, I'd tried the test that you mentioned and got the same results. I can't seem to find any way to tell the game that I want a tipped arrow of a specific kind, not the generic ("uncraftable?") version. Also, the arrows are correctly being removed from my inventory in creative mode, though I'm not terribly concerned over that because I play on an SMP.

I think I may have seen someone mention a Skript addon related to my issue, but I can't figure out where it was.
 
  • Like
Reactions: kittkarrkitt
Status
Not open for further replies.