Jump to content

when a location is stored, would the coordinates be floats or integers?


JustMe003

Recommended Posts

I want to compare 2 locations, but I don't know if the location function uses integers or floats as coordinates. Both locations are stored by typing an command, which will save the location of the player. But because it's almost impossible to line yourself up to get integers as coordinates, the locations wouldn't match, unless the location function stores the location with integers.

Note, I did not try any of this out. It is a question/error I hope to encounter before running my whole skript and finding out it isn't working at all.

Link to comment
Share on other sites

It's using floats, but what I recommend you do is to round them

example:

set {_c} to player's x coordinate
set {_rounded} to rounded down {_c}

(note: you should always either round them up or down if you're trying to match them as otherwise you'll encounter issues if the first value is less than 0.5 and the other one greater than or equal to 5)

  • Thanks 1
Link to comment
Share on other sites

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
×
×
  • Create New...