Jump to content

/sp


qing

Recommended Posts

Posted

is there a way to bind a key to teleport me X units instead of teleporting me to the specific location:

ex. /bind G sp x x x+3  (every time you press G it teleports you ahead 3 units) instead of /bind G sp x x 3 (which shifts your pos. to Z = 3 )

Is this possible or it isn't?

Posted
2 hours ago, Overkillz said:

You can get your current location and increase any of the floats with the value you want.

 

Could you clarify how via an example?

Posted

Each time you press the key that handle the function

you need to get your current location getElementPosition() and set a new one increasing one of the float of your current one.

Something like this 

local increaseBy = 3
local x,y,z = getElementPosition(localPlayer)
setElementPosition(localPlayer,x,y,z+increaseBy)

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...