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

Started by atomicButterprob on

Topic category: Help with modding (Java Edition)

Last seen on 04:45, 22. Mar 2023
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

Last seen on 19:44, 28. Jun 2023
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