Changing the sound of mobs (LibsDisguises help)

Discussion in 'Community Support' started by Carlos, Jul 17, 2019.

  1. Carlos

    Carlos New Member
    Supporter

    Joined:
    Jan 12, 2018
    Messages:
    5
    Likes Received:
    1
    So, I want to make a hostile pig as a mob, but tried every way to make it work without using the LibsDisguises, but couldnt figure it out. In the end, I decided to change the mob to a pig while keeping everything else as it is, but disguising the mob as a pig.

    The problem is, I want the sound of the pig to be made (on hit, on death and ambient). I can do it by using skills, but the zombie sound will still be played (ambient, death and hit).

    I dont know if I can fix this by using skills, or by doing something specific, but any help would be appreciated!

    If you guys want/need to know the skills and the mob code, ill gladly provide it!

    Once again, thank you for the help!
     
    #1
  2. Buguser

    Buguser Active Member
    Supporter Quality Assurance Moderator

    Joined:
    Oct 11, 2016
    Messages:
    268
    Likes Received:
    62
    #2
  3. Carlos

    Carlos New Member
    Supporter

    Joined:
    Jan 12, 2018
    Messages:
    5
    Likes Received:
    1
    I tried using the Silent option to true, but that makes the skill sounds go silent as well.

    So, without silent, the zombie makes the pig sounds but also the zombie sounds, but on silent it makes no sound at all, including the skill sounds.
     
    #3
  4. Buguser

    Buguser Active Member
    Supporter Quality Assurance Moderator

    Joined:
    Oct 11, 2016
    Messages:
    268
    Likes Received:
    62
    Please post the mob config here, it should work as i use that together with the sound mechanic in all of my disguises mobs.
     
    #4
  5. Carlos

    Carlos New Member
    Supporter

    Joined:
    Jan 12, 2018
    Messages:
    5
    Likes Received:
    1
    Here's the config for the mob:
    Code:
    1Pig:
      Type: ZOMBIE
      Display: '&c&lLevel 1 Pig'
      Health: 10
      Damage: 3
      Skills:
      - skill{s=PigHurt} @Self ~onDamaged 1
      - skill{s=PigDeath} @Self ~onDeath 1
      - skill{s=PigAmbient} @Self ~onTimer:100
      Equipment:
      - leather_helmet:4
      AIGoalSelectors:
      - 0 clear
      - 1 movetowardstarget
      - 2 lookatplayers
      - 3 randomstroll
      - 4 float
      AITargetSelectors:
      - 0 clear
      - 1 players
      Options:
        AlwaysShowName: true
        MovementSpeed: 0.35
        Despawn: true
        MaxCombatDistance: 50
        PreventOtherDrops: true
        Silent: true
      Disguise:
        Type: pig
    And the skills that involve it:
    Code:
    PigHurt:
      Skills:
      - sound{s=entity.pig.hurt} @Self
    PigDeath:
      Skills:
      - sound{s=entity.pig.death} @Self
    PigAmbient:
      - sound{s=entity.pig.ambient} @Self
     
    #5
  6. Carlos

    Carlos New Member
    Supporter

    Joined:
    Jan 12, 2018
    Messages:
    5
    Likes Received:
    1
    Not sure what I did wrong here, but can you help me out?
     
    #6
  7. Buguser

    Buguser Active Member
    Supporter Quality Assurance Moderator

    Joined:
    Oct 11, 2016
    Messages:
    268
    Likes Received:
    62
    What is your Minecraft and MythicMobs version? It works fine for me, still, I'd change a few things for the mob:

    Replacing the skills 'PigHurt', 'PigDeath' and 'PigAmbient' by using the mechanics directly in the mob and adding a sound for attacks.
    Code:
      Skills:
      - sound{s=entity.pig.ambient;p=1} @self ~onTimer:125 0.4
      - sound{s=entity.pig.hurt;p=1} @self ~onDamaged
      - sound{s=entity.generic.eat;p=0.7} @self ~onAttack
      - sound{s=entity.pig.death;p=1} @self ~onDeath
    Overworking the AI as the mob wasn't able to attack players:
    Code:
      AIGoalSelectors:
      - 0 clear
      - 1 meleeattack
      - 2 float
      - 3 lookatplayers
      - 4 randomstroll
      AITargetSelectors:
      - 0 clear
      - 1 players
     
    #7

Share This Page