I need help with triggers

Started by nik2772 on

Topic category: Help with modding (Java Edition)

Last seen on 20:18, 11. Jul 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need help with triggers
Wed, 06/26/2024 - 05:34 (edited)

I want a mob to generate an ambient sound when it is alive, but
 it repeats infinitely and is very annoying. How can I make it 
play once in a loop while the mob is alive?
Edited by nik2772 on Wed, 06/26/2024 - 05:34
Last seen on 15:36, 5. Aug 2024
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This Is Only For One Mob Of…
Wed, 06/26/2024 - 15:13

This Is Only For One Mob Of Type: create a global number variable named mobsound that is set to 0. Then do a procedure so when the mob is spawned, if mobsound = 0 then play sound and set mobsound to 1. Example:

when mob of type _ spawns

if mobsound = 0

     then set mobsound to 1

      play sound _

-PixelKid