is there a way to make a mob attack you if you have a specific potion effect

Started by randomcontentq on

Topic category: Help with MCreator software

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is there a way to make a mob attack you if you have a specific potion effect
Wed, 02/09/2022 - 00:41 (edited)

So i wanted to make a mob that attacks me if i have a specific effect

Edited by randomcontentq on Wed, 02/09/2022 - 00:41
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
using a condition on the ai…
Thu, 03/10/2022 - 14:03

using a condition on the ai u can create a procedure to test for just about anything before setting an attack target, just click on the "conditions" for the ai attack block, create a procedure like this:

if (has {nearest entity of type [player] in a (configurable amount) range} potion effect {potion effect here}):

return true

(end if if statement)

return false

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you show me the…
Wed, 07/20/2022 - 08:05

Can you show me the procedures pleas

 

Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi Idk if you still need a…
Sat, 04/01/2023 - 16:36

Hi Idk if you still need a photo but I can give you a photo of my condition code.

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey, I know it's been over a…
Thu, 04/04/2024 - 17:25

Hey, I know it's been over a year, but Terrarindy, do you still have that photo?

I've done the simple IF statement for:

 

if event/target entity has custom:effect

     return logic: true

else

     return logic: false

 

And then set the entity's attack condition for the player to be for this procedure, but it just doesn't work in game. Was wondering if you still have that photo of your condition?