Solved Control a entity with WASD (like horses)

  • 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.
@jaylawl thanks I've looked at it but, I actually didn't understand how can I move the entity. Can you help me with it?
[doublepost=1534271924,1534271808][/doublepost]@jaylawl and actually. I need it for 1.7.10 :emoji_stuck_out_tongue: Is there a way to do it in 1.7.x / 1.8.x
 
No, sorry, i'm far from knowledgable about these old versions.

You move the entity by using this:
code_language.skript:
on vehicle steer forward:
    push event-player's vehicle in event-player's horizontal facing with speed 1

Something like this, the syntax is propably off

/edit:
Nevermind, found some old code of mine that i used for this (with WolvSK):
code_language.skript:
on vehicle steer forward:
    # event-player's vehicle is on ground
    add "{Rotation:[%event-player's yaw%f, %event-player's pitch%f]}" to event-player's vehicle's nbt
    push event-player's vehicle forward with speed 0.2
   
on vehicle steer backward:
    event-player's vehicle is on ground
    add "{Rotation:[%event-player's yaw%f, %event-player's pitch%f]}" to event-player's vehicle's nbt
    push event-player's vehicle backwards with speed 0.2
   
on vehicle steer left:
    event-player's vehicle is on ground
    add "{Rotation:[%event-player's yaw%f, %event-player's pitch%f]}" to event-player's vehicle's nbt
    push event-player's vehicle left with speed 0.05
   
on vehicle steer right:
    event-player's vehicle is on ground
    add "{Rotation:[%event-player's yaw%f, %event-player's pitch%f]}" to event-player's vehicle's nbt
    push event-player's vehicle right with speed 0.05
   
on vehicle steer jump:
    event-player's vehicle is on ground
    y of event-player's vehicle's velocity < 0
    add "{Rotation:[%event-player's yaw%f, %event-player's pitch%f]}" to event-player's vehicle's nbt
    push event-player's vehicle up with speed 0.5

The nbt stuff requires SkStuff, but you just omit that
 
  • Like
Reactions: aglazirilziril
No, sorry, i'm far from knowledgable about these old versions.

You move the entity by using this:
code_language.skript:
on vehicle steer forward:
    push event-player's vehicle in event-player's horizontal facing with speed 1

Something like this, the syntax is propably off

/edit:
Nevermind, found some old code of mine that i used for this (with WolvSK):
code_language.skript:
on vehicle steer forward:
    # event-player's vehicle is on ground
    add "{Rotation:[%event-player's yaw%f, %event-player's pitch%f]}" to event-player's vehicle's nbt
    push event-player's vehicle forward with speed 0.2
  
on vehicle steer backward:
    event-player's vehicle is on ground
    add "{Rotation:[%event-player's yaw%f, %event-player's pitch%f]}" to event-player's vehicle's nbt
    push event-player's vehicle backwards with speed 0.2
  
on vehicle steer left:
    event-player's vehicle is on ground
    add "{Rotation:[%event-player's yaw%f, %event-player's pitch%f]}" to event-player's vehicle's nbt
    push event-player's vehicle left with speed 0.05
  
on vehicle steer right:
    event-player's vehicle is on ground
    add "{Rotation:[%event-player's yaw%f, %event-player's pitch%f]}" to event-player's vehicle's nbt
    push event-player's vehicle right with speed 0.05
  
on vehicle steer jump:
    event-player's vehicle is on ground
    y of event-player's vehicle's velocity < 0
    add "{Rotation:[%event-player's yaw%f, %event-player's pitch%f]}" to event-player's vehicle's nbt
    push event-player's vehicle up with speed 0.5

The nbt stuff requires SkStuff, but you just omit that
I've tried it, no errors on the console and no errors when reloading the skript but; only jumping works.
 
You might need protocol lib for this, in case you don't. Other than that i can only think of the MC version being too old. But can't say for sure
 
  • Like
Reactions: aglazirilziril
Oh, that was my wrong sorry :emoji_stuck_out_tongue: Its working now, but its a bit buggy; is it possible to make just like in this video?
[doublepost=1534275634,1534273915][/doublepost]@jaylawl I've played with the speeds ect. but I still can not make as on the video i sent :/
 
I can't help you any further, you'll just have to experiment/research, or wait until somebody else with more knowledge than me comes along
 
Status
Not open for further replies.