Solved Push Minecart

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Donut

Well-Known Member
Mar 27, 2017
1,336
177
0
U.S.
im trying to push a minecart but it goes really slow no matter what speed i push it at. anyone know how to make it go faster?
code_language.skript:
on rightclick:
    if player is riding a minecart:
        if player's tool is a stick:
            loop entities in radius 1 of player:
                if loop-value is a minecart:
                    push loop-value in horizontal direction of player at speed 10000
 
I tested here and indeed it push at same speed.
code_language.skript:
command /pushminecart:
    trigger:
        spawn a minecart 2 meters horizontally in front of player
        push last spawned entity in horizontal direction of player at speed 1
        spawn a minecart 1 meter left and 2 meters horizontally in front of player
        push last spawned entity in horizontal direction of player at speed 10
But using same code for player (or anything else), it pushes at different speeds.
code_language.skript:
command /pushminecart:
    trigger:
        spawn a pig 2 meters horizontally in front of player
        push last spawned entity in horizontal direction of player at speed 1
        spawn a pig 1 meter left and 2 meters horizontally in front of player
        push last spawned entity in horizontal direction of player at speed 10
 
This happens because its on the ground the blocks will make it stop what you can do is spawn it a bit higher from the ground with the nogravity tagg
 
  • Like
Reactions: Donut
Status
Not open for further replies.