Skill Trigger "~onExplode" sometimes executes twice

Discussion in 'Support' started by Kino, May 15, 2018.

  1. Kino

    Kino New Member

    Joined:
    Sep 28, 2015
    Messages:
    23
    Likes Received:
    0
    I don't know if someone has already detected this bug.
    MythicMobs v4.3.2 + Spigot 1.12.2

    Code:
    Creeperyon:
      Type: Creeper
      Display: '&dCreeperyion'
      Health: 6
      Damage: 35
      Skills:
      - message{m="<mob.name><&co> Arrrghgg!"} @World ~onExplode
     
    #1
  2. AnimalMace

    AnimalMace Member

    Joined:
    Jul 3, 2017
    Messages:
    140
    Likes Received:
    4
    do you need a solution?
     
    #2
  3. Kino

    Kino New Member

    Joined:
    Sep 28, 2015
    Messages:
    23
    Likes Received:
    0
    Yes, please.
     
    #3
  4. AnimalMace

    AnimalMace Member

    Joined:
    Jul 3, 2017
    Messages:
    140
    Likes Received:
    4
    try to run a skill ~onExplode that adds a mobscore of 1 at a random objective, (the name of the objective doesnt really matter)
    Also add a condition that it can only by runned if the score is 0

    it would look like this:
    Code:
    ExplodeScore:
      Conditions:
      - score{objective=Explode;v=0}
      Skills:
      - modifymobscore{objective=Explode;action=add;value=1} @self
    
    
    add another skill to it, that runs the things you want ~onExplode.

    Code:
    ExplodeScore:
      Conditions:
      - score{objective=Explode;v=0}
      Skills:
      - modifymobscore{objective=Explode;action=add;value=1} @self
      - skill{s=ExplodeEffects}
    
    In the skill ExplodeEffects, add the same condition. But this time it needs a score of 1.


    This would normally work (you cant count to 1 twice)
    let me know if it works, i'll seek another solution otherwise ^_^
     
    #4
  5. Kino

    Kino New Member

    Joined:
    Sep 28, 2015
    Messages:
    23
    Likes Received:
    0
    It doesn't work, or in other words, it actually do exactly the same as without using score., think that if "~ onExplode" is executed 2 times for any reason, there will always be 2 skills executed at the same time each one with his score, so we go back to the starting point.

    My creeper is disguised as a sheep, I don't think this is the cause of the bug, I assume that it's a bug because it always worked correctly until months ago when updating to 4.3.x.

    If you wanna see the bug yourself, you can try creating a creeper and let it explode by respawning another creeper over and over again, don't forget to put godmode on you. ;)

    Thanks for your help.
     
    #5
  6. AnimalMace

    AnimalMace Member

    Joined:
    Jul 3, 2017
    Messages:
    140
    Likes Received:
    4
    huh strange, it would normally count like: 1, 2, 3, 4, 5,.. not 1, 1, 2, 2, 3, 3, 4, 4, …

    the awesome thing that dint work for me, (it maybe works in this case)
    does it work when you add Cooldown: X to the skill?
     
    #6
  7. Kino

    Kino New Member

    Joined:
    Sep 28, 2015
    Messages:
    23
    Likes Received:
    0
    Yeah, I've tried almost everything and nothing works if the problem base is a bug in the trigger.
     
    #7
  8. AnimalMace

    AnimalMace Member

    Joined:
    Jul 3, 2017
    Messages:
    140
    Likes Received:
    4
    hmhm..

    do you actually need the vanilla explosion?
    you could otherwise make a explosion using mythicmobs
     
    #8

Share This Page