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!


    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.

[Closed] Launching a boat that a player is riding

Discussion in 'Skript' started by CustomWorldYT, Feb 17, 2019.

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

    CustomWorldYT Member

    Jun 17, 2018
    Likes Received:
    Skript Version (do not put latest): Skript 2.3.5 (from GitHub)
    Skript Author: bensku
    Minecraft Version: 1.13.2
    So, I'm trying to create a boat-race plugin (where you drive on the ice). The trouble is, that when a boat meets higher terrain, it obviously can't just "climb it up". So I have decided to make some kind of "boat launch pads" which should launch boats upwards. The problem is, that the boat isn't launched. For test purposes, I have created a simple dummy script to test, if it could work:
    Code (Text):
    1. on vehicle enter:
    2.     set {_%player%.boat} to event-entity
    3.     broadcast "vehicle set"
    4.     stop
    6. on step on redstone block:
    7.     push {_%player%.boat} upwards at speed 1
    8.     broadcast "pushed"
    9.     stop
    11. command /push:
    12.     trigger:
    13.         push {_%player%.boat} upwards at speed 1
    14.         broadcast "pushed"
    15.         stop
    The "pushed" message is for debugging purposes, to see if the event is actually triggered. When the player in a boat meets a redstone block, the message is sent, however, the boat isn't launched, as it should work. I already heard that boats are "delicious" entities when it comes to manipulating with them. I have tried to search on the internet, but I found nothing. I ask if I can actually make a working "boat-pads" or if it's possible. If not, I guess that I will need to make horse-racing instead.

    Errors on Reload:
    1. An entity cannot be saved, i.e. the contents of the variable {%the player%.boat} will be lost when the server stops. (script.sk, line 2: set {%player%.boat} to event-entity')
    I said it's a test script. And the boat should be saved as soon as the server doesn't stop, right?

    Console Errors: (if applicable)
    1. No errors.

    Other Useful Info:

    Addons using (including versions):
    No addons used.


    Have you tried searching the docs? Yes
    Have you tried searching the forums? Yes
    What other methods have you tried to fix it? I have tried to create a "/push" command, pushing the player upwards, but this didn't work either.
    #1 CustomWorldYT, Feb 17, 2019
    Last edited: Feb 19, 2019
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Sep 7, 2017
    Likes Received:
    Variables that start with an underscore are local variables, as in local to the event.
    So you are setting variables, that are deleted after the event
  3. CustomWorldYT

    CustomWorldYT Member

    Jun 17, 2018
    Likes Received:
    Thanks for advice, Shane, however the boat is still not launched, even if I removed the underscores in the variables. I also tried to modify my script a little, currently it looks like this:

    Code (Text):
    1. command /boat:
    2.     trigger:
    3.         spawn boat at player's location
    4.         set {%player%.boat} to last spawned entity
    6. command /push:
    7.     trigger:
    8.         push {%player%.boat} upwards at speed 1
    9.         broadcast "pushed(?)"
    10.         stop
    12. command /purgeboat:
    13.     trigger:
    14.         delete {%player%.boat}
    15.         message "purged"
    16.         stop
    18. on step on redstone block:
    19.     push {%player%.boat} upwards at speed 1
    20.     broadcast "(hopefully) pushed"
    21.     stop
    This code doesn't work either, and no errors or warnings were shown. The "/push" command doesn't work too.

    Edit: I also tried this test script, but it works only for minecarts:

    Code (Text):
    1. on right click:
    2.     cancel event
    3.     push player's vehicle upwards with speed 1
    This might be a possible bug in Skript, so I'm creating a report at GitHub as well.
    --- Double Post Merged, Feb 23, 2019, Original Post Date: Feb 20, 2019 ---
    Another edit: Developers believe, that this is a Minecraft limitation, so I think, that I will use some other vehicle instead.

    Final Edit:
    For those looking for a good Skript vehicle system, I have found this piece of code:
    The minecart is quite slow, but this is enough for me:
    Code (Text):
    1. on right click with minecart:
    2. make the player ride a minecart
    3.     while player's vehicle is set:
    4.         push player's vehicle in horizontal direction of player at speed 0.8
    #3 CustomWorldYT, Feb 23, 2019
    Last edited: Feb 23, 2019
Thread Status:
Not open for further replies.

Share This Page