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.

How to push a player toward something?

Discussion in 'Skript' started by pepper82, Feb 28, 2017.

Thread Status:
Not open for further replies.
  1. pepper82

    pepper82 Member

    Joined:
    Jan 26, 2017
    Messages:
    268
    Likes Received:
    1
    Hey all,

    I want to push a player toward an enemy in a nice way, look at the picture:
    [​IMG]
    I do not want the player to be pushed straight.

    How to do it?
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,185
    Likes Received:
    216
    Needs SkQuery.

    Syntax:
    Code (Skript):
    1. #Skript
    2. (push|thrust) %entities% %direction% [(at|with) (speed|velocity|force) %number%]
    3.  
    4. #SkQuery (Returns direction)
    5. [the] direction from %location% to %location%
    Examples:
    Code (Skript):
    1. push player (direction from player to {_loc}) at speed 2.5
    2.  
    3. push player (direction from player to location of {_player}) at speed 3
    If you want them to get an arc, push them up and wait a tick before using the code above.
     
    • Like Like x 3
Thread Status:
Not open for further replies.

Share This Page

Loading...