Author Topic: How to get ent's origin position from locs position.  (Read 7153 times)

mRokita

  • Autococker
  • Posts: 598
How to get ent's origin position from locs position.
« on: May 23, 2015, 12:17:32 PM »
Hey!
I wanted to improve my Ent Maker by adding an option to create custom spawnpoints. Unfortunately loc's XYZ isnt equal to ent's origin. How can i convert position of a LOC to ent's origin?
Is it even possible?

Chef-Killer

  • Map Committee
  • Autococker
  • Posts: 1312
Re: How to get ent's origin position from locs position.
« Reply #1 on: May 24, 2015, 05:25:16 AM »
I think there's a command for this. Try something like "position", "angle" or "angles". I don't know the correct command offhand...didn't use them for a long time, sorry :-/

mRokita

  • Autococker
  • Posts: 598
Re: How to get ent's origin position from locs position.
« Reply #2 on: May 24, 2015, 06:48:02 AM »
I think there's a command for this. Try something like "position", "angle" or "angles". I don't know the correct command offhand...didn't use them for a long time, sorry :-/
The problem is that i have to count it in Python :[
Or its possible to do something like $position

mRokita

  • Autococker
  • Posts: 598
Re: How to get ent's origin position from locs position.
« Reply #3 on: May 24, 2015, 06:59:40 AM »
Got it!
To get origin from a LOC, you have to divide x y and z by 8.
Example:
LOC:
-144 190 1224
Origin
-144/8 190/8 1224/8 = -18 23.75 153
« Last Edit: March 04, 2018, 04:59:10 PM by mRokita »