For those getting started with GG and LUA, you will at times need to know the X Y Z coordinates of a specific entity, and the X Y Z coordinates of the player/camera.
The following simple scripts can be used to gather this information.
The first script (aaentityxyzprompt.lua) displays a prompt with the X Y Z values of a specific entity.
-- Script to display current X Y Z corrdinates of the entity
-- to which the script is attached
function aaentityxyzprompt_init(e)
end
function aaentityxyzprompt_main(e)
x1=math.floor (g_Entity[e] ['x'])
y1=math.floor (g_Entity[e] ['y'])
z1=math.floor (g_Entity[e] ['z'])
Prompt("Entity Position X= "..x1.." Y= "..y1.." Z= "..z1)
end
Temporarily attached this script to the entity (make sure the entity static is set to NO, and set Always Use to YES)
Run your test mode and the prompt will provide the X Y Z location of the entity.
The second script displays the X Y Z coordinates of the player/camera
-- Script to display current X Y Z corrdinates of the player/camera
function aaplayerxyzprompt_init(e)
end
function aaplayerxyzprompt_main(e)
x1=math.floor (g_PlayerPosX)
y1=math.floor (g_PlayerPosY)
z1=math.floor (g_PlayerPosZ)
Prompt("X= "..x1.." Y= "..y1.." Z= "..z1)
end
As above, temporarily attached this script to the entity (make sure the entity static is set to NO, and set Always Use to YES)
Run your test mode and the prompt will provide a running update of the X Y Z coordinates of the player/camera.
These have come in handy for me, hope you find them useful
Go Devils
"THERE IS NO SPOON"
AMD 6300 6 core 3.5 ghz, Windows 8.1, 8GB ram, GTX 650 2GB ram