how do i make mob turn invisible when it locate it enemy/target

Started by atomicButterprob on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do i make mob turn invisible when it locate it enemy/target

i was about to make a feature to my ghost type mob when they target the enemy they turn invisible and ambush with procedure code

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you could create a local…
Tue, 11/29/2022 - 14:31

you could create a local variable and set it to 1 when your entity targets its target lol

then:

 

if (localvariable) = 1

do potion effect invisible for x ticks