Need to make target selector only select one entity The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Is there a way to constantly track one players jumping activityAll Minecraft target selector argumentsDifferent commands select different entities (with the same target selector)Summoning enderpearls on arrows with custom name shot by a playerWhy won't my arrow gain an objective?Is there any way to make scoreboard objectives Universal?Target Selector Argument problemMinecraft 1.13 execute command on all endermen on the outer end islandsHow to make a score be recorded as team?My arrows aren't being executed at by a looping function/command block
Arduino Pro Micro - switch off LEDs
Why can't devices on different VLANs, but on the same subnet, communicate?
He got a vote 80% that of Emmanuel Macron’s
Does Parliament need to approve the new Brexit delay to 31 October 2019?
how can a perfect fourth interval be considered either consonant or dissonant?
The following signatures were invalid: EXPKEYSIG 1397BC53640DB551
Didn't get enough time to take a Coding Test - what to do now?
Scientific Reports - Significant Figures
What information about me do stores get via my credit card?
How is simplicity better than precision and clarity in prose?
Did God make two great lights or did He make the great light two?
Can smartphones with the same camera sensor have different image quality?
How should I replace vector<uint8_t>::const_iterator in an API?
Install many applications using one command
Would an alien lifeform be able to achieve space travel if lacking in vision?
Difference between "generating set" and free product?
In horse breeding, what is the female equivalent of putting a horse out "to stud"?
"... to apply for a visa" or "... and applied for a visa"?
Can the DM override racial traits?
Grover's algorithm - DES circuit as oracle?
How to delete random line from file using Unix command?
ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?
The variadic template constructor of my class cannot modify my class members, why is that so?
How did the audience guess the pentatonic scale in Bobby McFerrin's presentation?
Need to make target selector only select one entity
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Is there a way to constantly track one players jumping activityAll Minecraft target selector argumentsDifferent commands select different entities (with the same target selector)Summoning enderpearls on arrows with custom name shot by a playerWhy won't my arrow gain an objective?Is there any way to make scoreboard objectives Universal?Target Selector Argument problemMinecraft 1.13 execute command on all endermen on the outer end islandsHow to make a score be recorded as team?My arrows aren't being executed at by a looping function/command block
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm writing a function for a datapack in Minecraft. After /reloading, /function couldn't find the function, so I pasted each line into Minecraft to check for syntax and other errors. I found that the problem was in the commands that store the aoecloud's position into a scoreboard, and also in the ones that take those values and place them into the Motion nbt for an arrow. The issue is that according to Minecraft, only one entity is allowed in the target selector while my target selector is selecting multiple. I tried using a customName to fix this problem but it didn't work. How can I get the target selector to select the arrow/aoecloud created at the top of the function and not give me errors?
summon minecraft:arrow ^ ^ ^1 Tags:["sniperbullet"], CustomName:""sniperbullet""
summon minecraft:area_effect_cloud 0 0 0 Tags:["sniperaoecloud"], CustomName:""sniperaoecloud""
execute as @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud] at @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud] rotated as @a[scores=gunshots=1..,nbt=SelectedItem:tag:display:Name:""text":"Sniper Rifle""] run tp @s ^ ^ ^1
scoreboard objectives add sniperx dummy
scoreboard objectives add snipery dummy
scoreboard objectives add sniperz dummy
execute store result score @s sniperx run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[0] 10000
execute store result score @s snipery run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[1] 10000
execute store result score @s sniperz run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[2] 10000
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[0] double 0.0001 run scoreboard players get @s sniperx
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[1] double 0.0001 run scoreboard players get @s snipery
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[2] double 0.0001 run scoreboard players get @s sniperz
scoreboard objectives remove sniperx
scoreboard objectives remove snipery
scoreboard objectives remove sniperz
scoreboard players set @e gunshots 0
scoreboard players set @s reloadSniper 50
FYI the goal of this function is to spawn an arrow in front of a player and get it to fly in the direction they are looking. Also, if you catch any other errors with my code please point them out to me.
minecraft minecraft-commands
New contributor
Nik3141 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I'm writing a function for a datapack in Minecraft. After /reloading, /function couldn't find the function, so I pasted each line into Minecraft to check for syntax and other errors. I found that the problem was in the commands that store the aoecloud's position into a scoreboard, and also in the ones that take those values and place them into the Motion nbt for an arrow. The issue is that according to Minecraft, only one entity is allowed in the target selector while my target selector is selecting multiple. I tried using a customName to fix this problem but it didn't work. How can I get the target selector to select the arrow/aoecloud created at the top of the function and not give me errors?
summon minecraft:arrow ^ ^ ^1 Tags:["sniperbullet"], CustomName:""sniperbullet""
summon minecraft:area_effect_cloud 0 0 0 Tags:["sniperaoecloud"], CustomName:""sniperaoecloud""
execute as @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud] at @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud] rotated as @a[scores=gunshots=1..,nbt=SelectedItem:tag:display:Name:""text":"Sniper Rifle""] run tp @s ^ ^ ^1
scoreboard objectives add sniperx dummy
scoreboard objectives add snipery dummy
scoreboard objectives add sniperz dummy
execute store result score @s sniperx run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[0] 10000
execute store result score @s snipery run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[1] 10000
execute store result score @s sniperz run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[2] 10000
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[0] double 0.0001 run scoreboard players get @s sniperx
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[1] double 0.0001 run scoreboard players get @s snipery
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[2] double 0.0001 run scoreboard players get @s sniperz
scoreboard objectives remove sniperx
scoreboard objectives remove snipery
scoreboard objectives remove sniperz
scoreboard players set @e gunshots 0
scoreboard players set @s reloadSniper 50
FYI the goal of this function is to spawn an arrow in front of a player and get it to fly in the direction they are looking. Also, if you catch any other errors with my code please point them out to me.
minecraft minecraft-commands
New contributor
Nik3141 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I'm writing a function for a datapack in Minecraft. After /reloading, /function couldn't find the function, so I pasted each line into Minecraft to check for syntax and other errors. I found that the problem was in the commands that store the aoecloud's position into a scoreboard, and also in the ones that take those values and place them into the Motion nbt for an arrow. The issue is that according to Minecraft, only one entity is allowed in the target selector while my target selector is selecting multiple. I tried using a customName to fix this problem but it didn't work. How can I get the target selector to select the arrow/aoecloud created at the top of the function and not give me errors?
summon minecraft:arrow ^ ^ ^1 Tags:["sniperbullet"], CustomName:""sniperbullet""
summon minecraft:area_effect_cloud 0 0 0 Tags:["sniperaoecloud"], CustomName:""sniperaoecloud""
execute as @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud] at @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud] rotated as @a[scores=gunshots=1..,nbt=SelectedItem:tag:display:Name:""text":"Sniper Rifle""] run tp @s ^ ^ ^1
scoreboard objectives add sniperx dummy
scoreboard objectives add snipery dummy
scoreboard objectives add sniperz dummy
execute store result score @s sniperx run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[0] 10000
execute store result score @s snipery run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[1] 10000
execute store result score @s sniperz run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[2] 10000
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[0] double 0.0001 run scoreboard players get @s sniperx
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[1] double 0.0001 run scoreboard players get @s snipery
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[2] double 0.0001 run scoreboard players get @s sniperz
scoreboard objectives remove sniperx
scoreboard objectives remove snipery
scoreboard objectives remove sniperz
scoreboard players set @e gunshots 0
scoreboard players set @s reloadSniper 50
FYI the goal of this function is to spawn an arrow in front of a player and get it to fly in the direction they are looking. Also, if you catch any other errors with my code please point them out to me.
minecraft minecraft-commands
New contributor
Nik3141 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I'm writing a function for a datapack in Minecraft. After /reloading, /function couldn't find the function, so I pasted each line into Minecraft to check for syntax and other errors. I found that the problem was in the commands that store the aoecloud's position into a scoreboard, and also in the ones that take those values and place them into the Motion nbt for an arrow. The issue is that according to Minecraft, only one entity is allowed in the target selector while my target selector is selecting multiple. I tried using a customName to fix this problem but it didn't work. How can I get the target selector to select the arrow/aoecloud created at the top of the function and not give me errors?
summon minecraft:arrow ^ ^ ^1 Tags:["sniperbullet"], CustomName:""sniperbullet""
summon minecraft:area_effect_cloud 0 0 0 Tags:["sniperaoecloud"], CustomName:""sniperaoecloud""
execute as @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud] at @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud] rotated as @a[scores=gunshots=1..,nbt=SelectedItem:tag:display:Name:""text":"Sniper Rifle""] run tp @s ^ ^ ^1
scoreboard objectives add sniperx dummy
scoreboard objectives add snipery dummy
scoreboard objectives add sniperz dummy
execute store result score @s sniperx run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[0] 10000
execute store result score @s snipery run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[1] 10000
execute store result score @s sniperz run data get entity @e[type=minecraft:area_effect_cloud, tag=sniperaoecloud, name=sniperaoecloud] Pos[2] 10000
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[0] double 0.0001 run scoreboard players get @s sniperx
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[1] double 0.0001 run scoreboard players get @s snipery
execute store result entity @e[type=minecraft:arrow, tag=sniperbullet, name=sniperbullet] Motion[2] double 0.0001 run scoreboard players get @s sniperz
scoreboard objectives remove sniperx
scoreboard objectives remove snipery
scoreboard objectives remove sniperz
scoreboard players set @e gunshots 0
scoreboard players set @s reloadSniper 50
FYI the goal of this function is to spawn an arrow in front of a player and get it to fly in the direction they are looking. Also, if you catch any other errors with my code please point them out to me.
minecraft minecraft-commands
minecraft minecraft-commands
New contributor
Nik3141 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Nik3141 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Nik3141 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 21 mins ago
Nik3141Nik3141
235
235
New contributor
Nik3141 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Nik3141 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Nik3141 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "41"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Nik3141 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f348970%2fneed-to-make-target-selector-only-select-one-entity%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Nik3141 is a new contributor. Be nice, and check out our Code of Conduct.
Nik3141 is a new contributor. Be nice, and check out our Code of Conduct.
Nik3141 is a new contributor. Be nice, and check out our Code of Conduct.
Nik3141 is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Arqade!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f348970%2fneed-to-make-target-selector-only-select-one-entity%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown