• Hey! Register here to create your account, engage with the community, and talk about what is new!

How do i launch an entity sideways?

Kloodi2021

New member
Joined
May 5, 2022
Messages
7
Reaction score
1
I am looking forward to making a game about being able to ride and control a pig (for some reason)
but while I made functionality for moving forward/backward, I couldn't figure out how to create functionality for moving sideways.
I tried using Launch towards location, then it ended up not working. Can anybody help me with this?
 
Solution
You will need to first, shift the entity's location sideways using:
1688576515228.png
To do that, place any variable in the first slot (preferably a LOCAL one), and put a Game Value: Location (of the entity) in the 2nd slot and a number 1 should be enough in the 3rd slot. That will make the variable be a location on the right of the entity, now all you need to do is Launch the entity towards that location in a + (towards) or - (away) power to move it sideways.
Just make sure to set the Ignore Distance tag to TRUE
1688576648900.png

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,260
Reaction score
356
You will need to first, shift the entity's location sideways using:
1688576515228.png
To do that, place any variable in the first slot (preferably a LOCAL one), and put a Game Value: Location (of the entity) in the 2nd slot and a number 1 should be enough in the 3rd slot. That will make the variable be a location on the right of the entity, now all you need to do is Launch the entity towards that location in a + (towards) or - (away) power to move it sideways.
Just make sure to set the Ignore Distance tag to TRUE
1688576648900.png
 
Solution

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,260
Reaction score
356
Here is a give command and a template that allows you to do that, it currently launches with 15 power, you can change the number in the Entity Action to negative one to launch the other way:
/give @p ender_chest{display:{Name:"\"DFOnline Template\""},PublicBukkitValues:{"hypercube:codetemplatedata":'{"author":"DFOnline","name":"DFOnline Template","code":"H4sIAAAAAAAAA71SPWvDMBD9K0azhyTQDt5KswSyNWQpxVylqyNqS0E6J5jg/96TVTuN44ZAoaOf/D7u3p3Ee2nlpxfZ60loJbL4LVIBkrQ1DLzs9AetzFI7jBC/uYIZTCCsItWXlkS2eEw7rHuLYjlBwQwFBAG9pRqdM+GR8gM4Ruy+/1srPELjGQt6mTjz2rZNe//ZyD6q9N4GKmSwhNrI3dpKfvLS7jvMSigvpOYjqYIjlT/EiHeAFKJhOUxATafG2nCVbTESNHV1nW0eKG/t1C60OaAjDNRuC9/2IjhMF7fuBt3YIzh1q7SHu0sbKfYh0ZCmJod+DUNtG1fjUNmTUgnZ5Ll2jgnJFpnNtMsl3X9Af8qyKox1mCy1JzAS/+uIpjufjUsfz/BL9efLY/YXdRuuuckDAAA="}'}}
 
Top Bottom