Can a parent mob run a skill on the spawned mob?

Discussion in 'Support' started by AnimalMace, May 5, 2018.

  1. AnimalMace

    AnimalMace Member

    Joined:
    Jul 3, 2017
    Messages:
    174
    Likes Received:
    6
    Hi,

    I'm making a boss that spawns defending mobs.
    i want to use the sudoskill so the boss would run all the skills for the defending mobs.
    (so everything will go sync)

    but i can't find a targeter to get this done..
    i only found @parent but that casts the skill at defenders to the boss, i need it to cast skills at the boss to the defenders..

    i cant use a @e[name=X] targeter because i would like to use the skill for all my bosses.. it would take years to put the right names in the targeter for all bosses..


    i hope that the targeter that i'm seeking exists..

    Thanks
    AnimalMace
     
    #1
  2. Roger M

    Roger M Member
    Supporter

    Joined:
    May 13, 2016
    Messages:
    72
    Likes Received:
    8
    Maybe give the child mobs a scoreboard objective and set that as a condition under the cast @e
     
    #2
  3. AnimalMace

    AnimalMace Member

    Joined:
    Jul 3, 2017
    Messages:
    174
    Likes Received:
    6
    i gues that that would work, i only never got a @e cast with scoreboard conditions to run..
     
    #3
  4. Roger M

    Roger M Member
    Supporter

    Joined:
    May 13, 2016
    Messages:
    72
    Likes Received:
    8
    Let me know how it goes and I’ll tinker with it this weekend.

    I also haven’t forgotten about the mob despawning plugin :)
     
    #4
  5. AnimalMace

    AnimalMace Member

    Joined:
    Jul 3, 2017
    Messages:
    174
    Likes Received:
    6
    i googled it and i got a working targeter with mobscores, the idea works :D

    thanks~
     
    #5
  6. Buguser

    Buguser Active Member
    Supporter

    Joined:
    Oct 11, 2016
    Messages:
    127
    Likes Received:
    46
    Since version 4.3.0 MythicMobs has the targeter @Children ^^

    It is just missing in the manual like the targeter @Forward
     
    #6
    AnimalMace likes this.
  7. AnimalMace

    AnimalMace Member

    Joined:
    Jul 3, 2017
    Messages:
    174
    Likes Received:
    6
    let me update, i whas still on 4.2 xD
    EDIT:

    when i use the @ children targeter,
    and i use a variable like target.name or mob.owner.name or something that gives a player's name, does it give the name of the target/owner/.. of the parent or child?
     
    #7
    Last edited: May 6, 2018
  8. Lothari

    Lothari Member
    Supporter Premium Supporter

    Joined:
    Feb 7, 2018
    Messages:
    38
    Likes Received:
    24
    @AnimalMace,
    why not use signals and or tags to communicate between mobs?
    (Note: armor_stands cant have a tag for some reason and can only send signals)
    see my following example works like a charm:

    the mob:

    Code:
    WarpAniCoreStart:
    Type: pig
    Display: 'SuperteleportCore'
    Health: 200
    Damage: 0
    Skills:
      - skill{s=WarpAniCoreSkill1} @self ~onTimer:40
      - skill{s=WarpAniCoreStart} @self ~onSpawn
      - skill{s=WarpAniCoreTeleportEndSkill} @e[r=20,tag=kill] ~onDeath  
      - skill{s=WarpAniCoreTeleportStartSkill} @self ~onSignal:Ready
      - potion{type=INVISIBILITY;duration=200000000;level=2} @self ~onSpawn
      - mount{type=WarpAniCoreLock} @self ~onSpawn
    AITargetSelectors:
      - 0 clear
    Options:
      MovementSpeed: 0
      FollowRange: 100
      MaxCombatDistance: 100
      #AlwaysShowName: true
      PreventOtherDrops: true
      Collidable: false
      Silent: true
      Invincible: true
    how to send a signal:
    Code:
     - signal{s=Ready} @MobsInRadius{r=9;t=WarpAniCoreStart}
    how to trigger a skill using signals:
    Code:
    - skill{s=WarpAniCoreTeleportStartSkill} @self ~onSignal:Ready
    how to set a tag:
    Code:
    - addtag{t=kill} @self ~onspawn
    - addtag{t=kill} @MobsInRadius{r=20;t=WarpMarkerMob}
    
    how to select a tag:
    Code:
     - damage{amount=200;ignoreArmor=true} @e[r=10,tag=kill]


    the wiki:
    tags
    http://www.mythicmobs.net/manual/doku.php/skills/mechanics/addtag

    signals:
    http://www.mythicmobs.net/manual/doku.php/skills/mechanics/signal
     
    #8
    AnimalMace likes this.

Share This Page