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!

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

Making my First Skript, Need Help

Discussion in 'Requests' started by Willy Whitewool, Apr 8, 2021 at 7:23 PM.

  1. Willy Whitewool

    Joined:
    Thursday
    Messages:
    2
    Likes Received:
    0
    So basically I have a simple plugin that makes it so you can pick up and throw players and entities, however it has a few issues (mainly not working well with Bedrock players) so I'm trying to turn it into a Skript.

    Trying to make it so when a player shift + right clicks with an empty hand on an entity or player, the "clicked-on" entity/player mounts the player who shift + right clicked. Shift + right clicking again launches the mount about 4 blocks in the direction the player is looking. Also thinking of custom command that toggles being picked up or picking up.

    Link to the Plugin: https://dev.bukkit.org/projects/piggyback

    My Skript so far:

    on right click:
    if targeted entity exists:
    if player is sneaking:
    make the target ride the player

    Picking up works, but so far nothing for throwing or a command disabling being picked up or picking up.

    Edit: Nvm, someone in the discord helped me lol.

    skript if you're interested:
    on right click:
    set {_target} to clicked entity
    {yeet::%player%} is not set
    {yeet::%{_target}%} is not set
    player's tool is air
    if player is sneaking:
    set {_riders::*} to passengers of player
    if {_riders::*} is set:
    eject passengers of player
    set velocity of {_riders::*} to (normalized vector from player to location 1 forward player) ** vector(1, 0.7, 1)
    send "&l&oYeeted %{_target}%" to player
    else if {_target} exists:
    make {_target} ride player
    send "&l&oYoinked %{_target}%" to player
    command /yeet [<text>]:
    trigger:
    if {yeet::%player%} is set:
    delete {yeet::%player%}
    send "You can now pick up players and entities or be picked up!"
    else:
    set {yeet::%player%} to true
    send "You can now no longer pick up players or entities or be picked up!"
     
    #1 Willy Whitewool, Apr 8, 2021 at 7:23 PM
    Last edited: Apr 13, 2021 at 5:34 AM

Share This Page

Loading...