Teleport Spell Help

Discussion in 'Support' started by Blazeroidex, May 1, 2018.

  1. Blazeroidex

    Blazeroidex New Member

    Joined:
    Feb 2, 2018
    Messages:
    5
    Likes Received:
    0
    Hi, I've recently started to try to create class weapons with Artifacts. The Teleport spell, which teleports the player to wherever they're looking, has me stumped, though. The teleporting is working, but I want it so that the player is teleported to the ground whenever they teleport, so that they can't fly with it. I've tried summoning a mob to fall to the ground to teleport to, but they can't seem to recognize the parent player. Any suggestions?
    Here's my code:
    Code:
    teleport:
      Skills:
      - projectile{onHit=teleport-Hit;onEnd=teleport-End;v=100;i=1;hR=2;vR=2;hp=true;hnp=true;mR=20;par=false;sE=false;sB=true} @targetLocation
    teleport-Hit:
      Skills:
      - damage{amount=3;ignoreArmor=false}
    teleport-End:
      Skills:
      - teleport @Origin
     
    #1
  2. MooshroomStatus

    Joined:
    May 25, 2016
    Messages:
    96
    Likes Received:
    29
    Assuming I'm understanding you right, you want players to only teleport if they're on the ground? There's a good condition to add to that. The onground condition. Perhaps, this may fix your issue?

    Code:
    teleport:
      Conditions:
      - onground true
      Skills:
      - projectile{onHit=teleport-Hit;onEnd=teleport-End;v=100;i=1;hR=2;vR=2;hp=true;hnp=true;mR=20;par=false;sE=false;sB=true} @targetLocation
    teleport-Hit:
      Skills:
      - damage{amount=3;ignoreArmor=false}
    teleport-End:
      Skills:
      - teleport @Origin
     
    #2
  3. Blazeroidex

    Blazeroidex New Member

    Joined:
    Feb 2, 2018
    Messages:
    5
    Likes Received:
    0
    I meant that if there is a way to teleport to the ground nearby where the player is pointing, rather than just teleporting straight up, only to fall down and take fall damage. Thanks for trying to help though.
     
    #3
  4. MooshroomStatus

    Joined:
    May 25, 2016
    Messages:
    96
    Likes Received:
    29
    My only other thought is to have a weapon that uses the "shoot" mechanic on a cooldown, and make that weapon shoot out enderpearls so that way players are always grounded but can still teleport.
     
    #4
  5. Blazeroidex

    Blazeroidex New Member

    Joined:
    Feb 2, 2018
    Messages:
    5
    Likes Received:
    0
    Huh, I never thought of that. Thanks!
     
    #5

Share This Page