1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Making entity follow player's path

Discussion in 'Skript' started by any name you wish, Dec 15, 2020.

Thread Status:
Not open for further replies.
  1. any name you wish

    Joined:
    Nov 26, 2020
    Messages:
    2
    Likes Received:
    0
    So, I'm trying to make a script that allows players to ride sheep like pigs except without saddles or carrots. Currently, I am testing this on wolves. Everything works but the wolf doesn't jump when it hits a wall and the wolf can't turn. I am not using any addons and will refuse to use any.

    Code:
    Code (Text):
    1. on right click on wolf:
    2.     if player's tool is air:
    3.         set {_%player%.pet} to targeted entity
    4.         make player ride wolf
    5.         set {%player%.rdn} to 1
    6.         while {%player%.rdn} is 1:
    7.             wait 1 tick
    8.             push {_%player%.pet} In the horizontal direction of the player with force 0.2
    9.             set {_look} to player's yaw * -1
    10.             set {_loc} to location of {_%player%.pet}
    11.             set {_loc}'s yaw to {_look} parsed as integer
    12.             set {_loc}'s pitch to 0
    13.             teleport {_%player%.pet} to {_loc}
    14.             if player is not riding {_%player%.pet}:
    15.                 set {%player%.rdn} to 0
    16.        
     
Thread Status:
Not open for further replies.

Share This Page

Loading...