Started by
Rusher
on
Topic category: User side tutorials
Hey, im going to show you how to give entities in a specific radius a potion effect!
First off, use the procedure Execute Command / [Command] at x: [x] y: [y] z: [z].
Here are some examples of commands, you can use.
/effect @e[r=15] minecraft:poison 10 0
This command gives every entity in a 15 block radius poison level 1 for 10 seconds.
/effect @e[type=!minecraft:player,r=20] minecraft:regeneration 15 1
This command gives every entity except players in a 20 block radius regeneration level 2 for 15 seconds.
/effect @e[type=minecraft:zombie,r=25] minecraft:wither 20 2
This command gives every zombie in a 25 block radius wither level 3 for 20 seconds.
Hope this helps :)
Edited by Rusher on Tue, 05/25/2021 - 15:01
Nice tutorial!
Thanks :)
is there any way to use a custom potion effect with this?
Yes cootenboosch, just replace "minecraft:whatever" by the ID of your potion effect
In the latest versions, the radius selector is removed.
No it's not removed, it has been modified, you just need to get it
What means "you need to get it"?
hey, is there a way to do it not In a certain radius. I can do most commands but basically, I have 2 entities with the same name when I run into one I want to teleport to the other, this is the command: /execute @e[name=portalwhite] ~~~ /execute @a[r=0.5] ~~~ /tp @s @e[name=portalwhite, r]
what this does is the armour stand named "portalwhite" finds a player in a 0.5 radius of it, which is fine. But i need it so when you teleport you don't teleport to the armour stand you are at so I would like to teleport to an entity outside the distance of 2. in theory this should work but it doesn't /execute @e[name=portalwhite] ~~~ /execute @a[r=0.5] ~~~ /tp @s @e[name=portalwhite, r=!2]
please reply if anyone can help
try removing the / in your command (all the slashes)
because the block is called "Execute Command / [Command] at x: [x] y: [y] z: [z]"
it already contains a / so it might be mistaking the / for the start of a different command
/ is to tell the game that you will start a new command so each time you use / it will think of it as a start for a new command
because the block already implements a / it might think the / is part of the command
it might think the command is /execute instead of execute making it //execute instead of /execute
sorry to necropost but its not working for me. this is what it says
https://imgur.com/a/RTjbGI9