Unfortunatelly there is no way to get the actual coordinate values. All you can do is getting the coordinates of an entity and swapping it by another entitie’s coordinates.
local coords = Entity:GetCoords()
Entity2:SetCoords(coords)
I don’t know if this is useful for what you’re trying to achieve,
but GI uses the same routine that the console command “game.Teleport x y z” use.
You can use the “Character.LogData true” command to show the coordinates of the entities
(but the coordinates are only visible with GI; Grim Dawn removed the coords display some time ago).
If you’re looking for a Lua command to teleport your char, I don’t think there is one (but I’m not at home to verify it.)
Sorry, my English is too bad. I can only use machine translation
I don’t know if this statement can be made clear
It means that monsters are all in one coordinate, and there are countless monsters in this coordinate at the same time. Just like ghosts, there is no collision volume of body
It sounds to me like you are setting all entity coords to the same value.
Eg. local coords = Entity.GetCoords()
Entity2.SetCoords(coords)
Entity3.SetCoords(coords)
Entity4.SetCoords(coords)
When you probably should be changing them in some way, whether by having something like this:
local coords1 = Entity1GetCoords()
local coords2 = Entity2.GetCoords()
local coords3 = Entity3.GetCoords()
Entity1.SetCoords(coords3)
Entity2.SetCoords(coords1)
Entity3.SetCoords(coords2)
As an example.
Or by somehow getting one entity’s coords (or just arbitarily assigning coordinates) and setting other entitiy coords by using that coords modifed by different amounts. I’m not familiar with the programming language grim dawn uses for this, so I can’t give a usable example.
Perhaps it might look something like this:
local Xpos = Entity1.Xcoordinate
local Ypos = Entity1.Ycoordinate
local Zpos = Entity1.Zcoordinate
Then
Entity2.Xcoordinate is Xpos +,-, or * random float
Entity2.Ycoordinate is Ypos +,-, or * random float
Entity2.Zcoordinate is Zpos +,-, or * random float
And then repeat for each other entity.
Entity2.GetCoords()
What you get is a LUA Userdate(or Light Userdate)
The problem is that now I don’t know the structure of this UserData. Naturally, it can’t make a new coordinate that conforms to the specification
And I know that the real coordinates are in entity.origin, which is also UserData
If you have a way to analyze Lua usedata, you can analyze the real coordinates from entity.origin
So that we can make coordinates that meet the specifications
The question is can Lua operate UserData? I don’t know if there is such a method