push vehicle addon

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

MrNygus

Active Member
Jan 28, 2017
116
2
18
26
on vehicle steer forward:
#push vehicle of player horizontally forward at speed 0.2
push player's vehicle in player's direction with speed .3
broadcast "Go ahead"

I use WolvSK and in chat I can see "Go ahead" but my vehicle stands still.
142wls1.jpg
 
Your code works fine for me, I just think you're missing some things here:
  1. The rightclick event, when not looking at a block, that is, when looking at air, will only work if you're holding an item. Otherwise you'll just gonna have to look at the ground in order for the cart to move.
  2. As much as I know, pushing a minecart on the ground is not very successful. Even if you push the vehicle with a speed of 100, it will still go relatively slow. With boats is even worse; it won't even move if not on water.
 
Your code works fine for me, I just think you're missing some things here:
  1. The rightclick event, when not looking at a block, that is, when looking at air, will only work if you're holding an item. Otherwise you'll just gonna have to look at the ground in order for the cart to move.
  2. As much as I know, pushing a minecart on the ground is not very successful. Even if you push the vehicle with a speed of 100, it will still go relatively slow. With boats is even worse; it won't even move if not on water.
Could be me, but I didn't see a right click event in that code:
on vehicle steer forward:
# push vehicle of player horizontally forward at speed 0.2
push player's vehicle in player's direction with speed .3
broadcast "Go ahead"
 
Could be me, but I didn't see a right click event in that code:
on vehicle steer forward:
# push vehicle of player horizontally forward at speed 0.2
push player's vehicle in player's direction with speed .3
broadcast "Go ahead"
Oh you're right, magically popped in my head. Well the more you know lol
Still, the push effect won't be that effective with minecarts or boats. Didn't try with horses though...
 
Well, for the thread, there is an example for riding a chicken on the docs: https://docs.skunity.com/syntax/events/On Vehicle Steer
code_language.skript:
#Controlling and flying with Chickens (Rightclick with a stick to test)
on rightclick with stick:
    targeted entity is a chicken
    set {_target} to targeted entity
    make player ride {_target}
    wait 5 ticks
    while vehicle of player is {_target}:
        change yaw of vehicle of player to yaw of player
        change pitch of vehicle of player to pitch of player
        wait 1 tick

on vehicle steer:
    if event-button is space:
        push vehicle of player upwards at speed 0.4
    if event-button is w:
        push vehicle of player in the direction of player at speed 0.4
    if event-button is a:
        push vehicle of player to the left at speed 0.1
    if event-button is d:
        push vehicle of player to the right at speed 0.1
    if event-button is s:
        push vehicle of player backwards at speed 0.2
Posted by Mirreducki
 
Well, for the thread, there is an example for riding a chicken on the docs: https://docs.skunity.com/syntax/events/On Vehicle Steer
code_language.skript:
#Controlling and flying with Chickens (Rightclick with a stick to test)
on rightclick with stick:
    targeted entity is a chicken
    set {_target} to targeted entity
    make player ride {_target}
    wait 5 ticks
    while vehicle of player is {_target}:
        change yaw of vehicle of player to yaw of player
        change pitch of vehicle of player to pitch of player
        wait 1 tick

on vehicle steer:
    if event-button is space:
        push vehicle of player upwards at speed 0.4
    if event-button is w:
        push vehicle of player in the direction of player at speed 0.4
    if event-button is a:
        push vehicle of player to the left at speed 0.1
    if event-button is d:
        push vehicle of player to the right at speed 0.1
    if event-button is s:
        push vehicle of player backwards at speed 0.2
Posted by Mirreducki
Chicken probably work better, and now that I think about it, maybe in the same way as horses.
on vehicle steer forward:
#push vehicle of player horizontally forward at speed 0.2
push player's vehicle in player's direction with speed .3
broadcast "Go ahead"

I use WolvSK and in chat I can see "Go ahead" but my vehicle stands still.
142wls1.jpg
MrNygus, could you tell us what kind of vehicle you’re trying to work with?
 
I think gravity is true but I dont remember
Can you check it for me? Because if the gravity for the armorstand is turned off, it can't be pushed
 
Can you check it for me? Because if the gravity for the armorstand is turned off, it can't be pushed
You have right :emoji_grinning: Thanks :emoji_slight_smile:
How can I glue other armorstand next to armorstand? I want to teleport armostand always one block to the right of the player's vehicle.
 
Status
Not open for further replies.