Started by
scarfcrow
on
Topic category: Help with MCreator software
I wrote music for the bosses my mod adds, but how do I make the music play while the boss is alive and targeting a player only?
Essentially, if you're familiar with the Cataclysm mod, I want my boss music to work similarly to how it does there.
How do I do that?
make 2 procedures
first one: when entity sets it's target play sound: your music
second one: on entity tick update if not is get entity event target entity is targetting for attack the same entity as player execute command /stopsound @a * mod_id:sound_name
if your boss can target mobs/animals too it could be buggy, to solve that the first procedure should be: when entity sets it's target if is get entity event target entity is targetting for attack the same entity as player play sound: your music