I know this has probably been asked a million (well, ok, not THAT much) times, but I am at a loss on how to detect that a player was hit by an arrow, and not hit by another player's hand, sword, etc.
Can anyone help me out here? I need to be able to detect this to teleport them to a specific spot when hit.
First, thank you very much for responding to me about this. I really like whatever command block layout application you used - very, very cool! Secondly, this is very similar to what I was thinking, except that I am not wanting to detect when a player is killed, as much as, when a player is hit (it's part of a mini-game I am creating).
Here is what I was thinking (maybe you could help with the commands?):
Make an objective that watches player damage and increases by 1 when the player takes damage
TAG all players within a 3-block radius of an arrow that is not in the ground.
If the players with the TAG, also have a value of 1 or greater on the damage objective, these were hit by the arrow and I should do something (remove the TAG, reset the damage indicator, and perform my action)
First, thank you very much for responding to me about this. I really like whatever command block layout application you used - very, very cool! Secondly, this is very similar to what I was thinking, except that I am not wanting to detect when a player is killed, as much as, when a player is hit (it's part of a mini-game I am creating).
Here is what I was thinking (maybe you could help with the commands?):
Make an objective that watches player damage and increases by 1 when the player takes damage
TAG all players within a 3-block radius of an arrow that is not in the ground.
If the players with the TAG, also have a value of 1 or greater on the damage objective, these were hit by the arrow and I should do something (remove the TAG, reset the damage indicator, and perform my action)
Isn't this pretty similar to what you gave me?
First off, thank you! I spent the last weeks programming this application, with the intention of using it to show concepts in the Forums and elsewhere. But it has evolved into something much more extensive, with replace filters and one command generator.
The only thing you need to change to see when they get hit by an arrow it to change the scoreboard objective type to stat.damageTaken
The thing with this is that it only registers when the player loses health. When he has really strong armor, it might not work.
First off, thank you! I spent the last weeks programming this application, with the intention of using it to show concepts in the Forums and elsewhere. But it has evolved into something much more extensive, with replace filters and one command generator.
I realize this is NOT part of the discussion (I will work on this sometime this afternoon to get it to work), but I really LOVE this interface! Will you be making this public for all to use?
I realize this is NOT part of the discussion (I will work on this sometime this afternoon to get it to work), but I really LOVE this interface! Will you be making this public for all to use?
I have been trying to do the same exact thing and i have gone through and read this conversation and im still confused on what to do for the command block syntax. Could you clue me in on what to enter into the command blocks.
I know this has been a while, but the link that is posted there isn't working anymore, as it is a completely blank screen. If you could kindly post a different method, the same in different format, or fix the server, that would be greatly appreciated.
I know this has been a while, but the link that is posted there isn't working anymore, as it is a completely blank screen. If you could kindly post a different method, the same in different format, or fix the server, that would be greatly appreciated.
I know this has probably been asked a million (well, ok, not THAT much) times, but I am at a loss on how to detect that a player was hit by an arrow, and not hit by another player's hand, sword, etc.
Can anyone help me out here? I need to be able to detect this to teleport them to a specific spot when hit.
I don't think there is a perfect way to detect a player being killed by an arrow.
This is the closest I've got. It might be unreliable in some rare cases though. https://goo.gl/ujn0w5
My projects: https://blockbench.net/hub
First, thank you very much for responding to me about this. I really like whatever command block layout application you used - very, very cool! Secondly, this is very similar to what I was thinking, except that I am not wanting to detect when a player is killed, as much as, when a player is hit (it's part of a mini-game I am creating).
Here is what I was thinking (maybe you could help with the commands?):
Make an objective that watches player damage and increases by 1 when the player takes damage
TAG all players within a 3-block radius of an arrow that is not in the ground.
If the players with the TAG, also have a value of 1 or greater on the damage objective, these were hit by the arrow and I should do something (remove the TAG, reset the damage indicator, and perform my action)
Isn't this pretty similar to what you gave me?
First off, thank you! I spent the last weeks programming this application, with the intention of using it to show concepts in the Forums and elsewhere. But it has evolved into something much more extensive, with replace filters and one command generator.
The only thing you need to change to see when they get hit by an arrow it to change the scoreboard objective type to stat.damageTaken
The thing with this is that it only registers when the player loses health. When he has really strong armor, it might not work.
My projects: https://blockbench.net/hub
I realize this is NOT part of the discussion (I will work on this sometime this afternoon to get it to work), but I really LOVE this interface! Will you be making this public for all to use?
Just tried it and it works flawlessly! Thank you again for all your help. I can now move forward with the rest of my game.
It is public: http://server.zofenia.de/clg
My projects: https://blockbench.net/hub
Awesome! Thanks again for all your help.
I have been trying to do the same exact thing and i have gone through and read this conversation and im still confused on what to do for the command block syntax. Could you clue me in on what to enter into the command blocks.
Thanks in advance.
I know this has been a while, but the link that is posted there isn't working anymore, as it is a completely blank screen. If you could kindly post a different method, the same in different format, or fix the server, that would be greatly appreciated.
Useful command tools:
Mr. Garretto's Command Combiner Pro
Potion Effect Creator
Command Lines by JannisX11
This is the same setup moved to a new link: https://goo.gl/q7ReTF
My projects: https://blockbench.net/hub
I am also trying to make a mini game, and I want to make it where if you get hit by a sword, it teleports you to a destination of my choice.
Can you please help me?