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)

Active 2 years ago
Joined Oct 2022
Points:
369

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
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

Active 2 years ago
Joined Feb 2022
Points:
499

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 7
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