How to give specific entities in a specific radius a potion effect

Started by Rusher on

Topic category: User side tutorials

Last seen on 00:33, 7. Nov 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to give specific entities in a specific radius a potion effect
Tue, 05/25/2021 - 15:01 (edited)

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
Last seen on 00:33, 7. Nov 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks :)
Wed, 03/18/2020 - 06:17

Thanks :)

Last seen on 21:50, 20. Aug 2020
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is there any way to use a…
Fri, 07/17/2020 - 00:28

is there any way to use a custom potion effect with this?

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes cootenboosch, just…
Fri, 07/17/2020 - 14:16

Yes cootenboosch, just replace "minecraft:whatever" by the ID of your potion effect

Last seen on 14:43, 2. Aug 2022
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In the latest versions, the…
Fri, 07/17/2020 - 16:01

In the latest versions, the radius selector is removed.

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No it's not removed, it has…
Fri, 07/17/2020 - 16:47

No it's not removed, it has been modified, you just need to get it

Last seen on 12:14, 12. Apr 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What means "you need to get…
Fri, 04/16/2021 - 10:12

What means "you need to get it"?

Last seen on 16:21, 22. May 2021
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hey, is there a way to do it…
Sat, 05/22/2021 - 16:21

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

Last seen on 01:27, 24. Jan 2023
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
try removing the / in your…
Fri, 05/27/2022 - 23:33

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

Last seen on 20:20, 30. Nov 2023
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sorry to necropost but its…
Thu, 11/30/2023 - 20:21

sorry to necropost but its not working for me. this is what it says

https://imgur.com/a/RTjbGI9