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
How are presidential pardons supposed to be used?
A pet rabbit called Belle
The following signatures were invalid: EXPKEYSIG 1397BC53640DB551
Sort list of array linked objects by keys and values
In horse breeding, what is the female equivalent of putting a horse out "to stud"?
Segmentation fault output is suppressed when piping stdin into a function. Why?
Does Parliament need to approve the new Brexit delay to 31 October 2019?
How does ice melt when immersed in water
Are spiders unable to hurt humans, especially very small spiders?
system call string length limit
Single author papers against my advisor's will?
Is every episode of "Where are my Pants?" identical?
University's motivation for having tenure-track positions
First use of “packing” as in carrying a gun
When did F become S in typeography, and why?
What was the last x86 CPU that did not have the x87 floating-point unit built in?
How do you keep chess fun when your opponent constantly beats you?
How did passengers keep warm on sail ships?
How do I add random spotting to the same face in cycles?
Do warforged have souls?
Can a 1st-level character have an ability score above 18?
Are my PIs rude or am I just being too sensitive?
Why can't devices on different VLANs, but on the same subnet, communicate?
Why does the Event Horizon Telescope (EHT) not include telescopes from Africa, Asia or Australia?
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 13 mins ago
Nik3141Nik3141
255
255
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