English | 中文
Scene and coordinate transformation functions provided by SO3UI module.
Source: Source/Client/SO3UI/krepresentscripttable.cpp
nX, nY = Scene_GetCharacterTopScreenPos(dwID, nTargetType)| Parameter | Type | Description |
|---|---|---|
| dwID | number |
Character ID |
| nTargetType | number |
Target type constant (TARGET.*) |
Returns: number, number - Screen X and Y coordinates
Get the screen position of a character's head top.
⚠️ Thread Safety: Must be called from main thread or viaPostThreadCall.
fX, fY, fZ = Scene_GetCharacterTop(dwID, nTargetType)| Parameter | Type | Description |
|---|---|---|
| dwID | number |
Character ID |
| nTargetType | number |
Target type constant |
Returns: number, number, number - Scene X, Y, Z coordinates of character head top
Get the scene position of a character's head top.
⚠️ Thread Safety: Must be called from main thread or viaPostThreadCall.
nX, nY = Scene_ScenePointToScreenPoint(fSceneX, fSceneY, fSceneZ)| Parameter | Type | Description |
|---|---|---|
| fSceneX | number |
Scene X coordinate |
| fSceneY | number |
Scene Y coordinate |
| fSceneZ | number |
Scene Z coordinate |
Returns: number, number - Screen X and Y coordinates
Convert scene coordinates to screen coordinates.
⚠️ Thread Safety: Must be called from main thread or viaPostThreadCall.
fSceneX, fSceneY, fSceneZ = Scene_GameWorldPositionToScenePosition(nGameX, nGameY, nGameZ)| Parameter | Type | Description |
|---|---|---|
| nGameX | number |
Game world X coordinate |
| nGameY | number |
Game world Y coordinate |
| nGameZ | number |
Game world Z coordinate |
Returns: number, number, number - Scene X, Y, Z coordinates
Convert game world position to scene position.
nGameX, nGameY, nGameZ = Scene_ScenePositionToGameWorldPosition(fSceneX, fSceneY, fSceneZ)| Parameter | Type | Description |
|---|---|---|
| fSceneX | number |
Scene X coordinate |
| fSceneY | number |
Scene Y coordinate |
| fSceneZ | number |
Scene Z coordinate |
Returns: number, number, number - Game world X, Y, Z coordinates
Convert scene position to game world position.
nX, nY = Scene_GameWorldPositionToScreenPoint(nGameX, nGameY, nGameZ)| Parameter | Type | Description |
|---|---|---|
| nGameX | number |
Game world X coordinate |
| nGameY | number |
Game world Y coordinate |
| nGameZ | number |
Game world Z coordinate |
Returns: number, number - Screen X and Y coordinates
Convert game world position directly to screen point.
⚠️ Thread Safety: Must be called from main thread or viaPostThreadCall.
fX, fY = Scene_PlaneGameWorldPosToScene(nGameX, nGameY)| Parameter | Type | Description |
|---|---|---|
| nGameX | number |
Game world X coordinate |
| nGameY | number |
Game world Y coordinate |
Returns: number, number - Scene plane X and Y
Convert game world plane position to scene position (2D).
Scene_SelectObject(dwID, nTargetType)| Parameter | Type | Description |
|---|---|---|
| dwID | number |
Object ID |
| nTargetType | number |
Target type constant |
Returns: void
Select a scene object.
SceneObject_SetBrightness(dwID, nTargetType, fBrightness)| Parameter | Type | Description |
|---|---|---|
| dwID | number |
Object ID |
| nTargetType | number |
Target type constant |
| fBrightness | number |
Brightness value (0.0-1.0) |
Returns: void
Set the brightness of a scene object.
SceneObject_SetTitleEffect(dwID, nTargetType, szEffect)| Parameter | Type | Description |
|---|---|---|
| dwID | number |
Object ID |
| nTargetType | number |
Target type constant |
| szEffect | string |
Effect name |
Returns: void
Set the title effect of a scene object.
SetGlobalTopHeadFlag(nFlag)| Parameter | Type | Description |
|---|---|---|
| nFlag | number |
Flag value |
Returns: void
Set the global top head display flag.
nFlag = GetGlobalTopHeadFlag()Returns: number - Current top head flag
Get the global top head display flag.
SetGlobalTopIntelligenceLife(bShow)| Parameter | Type | Description |
|---|---|---|
| bShow | boolean |
Whether to show intelligence life top head |
Returns: void
Set whether to show intelligence life (pet) top head display.
Note: This is a Lua wrapper function defined in addonapi.lua
bShow = GetGlobalTopIntelligenceLife()Returns: boolean - Whether intelligence life top head is shown
Get whether intelligence life top head is shown.
Note: This is a Lua wrapper function defined in addonapi.lua
TargetSelection_AttachSceneObject(dwID, nTargetType)| Parameter | Type | Description |
|---|---|---|
| dwID | number |
Object ID |
| nTargetType | number |
Target type constant |
Returns: void
Attach target selection visual to a scene object.
TargetSelection_DetachSceneObject(dwID, nTargetType)| Parameter | Type | Description |
|---|---|---|
| dwID | number |
Object ID |
| nTargetType | number |
Target type constant |
Returns: void
Detach target selection visual from a scene object.
Global_SetCaptionParams(tParams)| Parameter | Type | Description |
|---|---|---|
| tParams | table |
Caption parameters |
Returns: void
Set global caption display parameters.
tConfig = Global_GetCaptionFontConfig()Returns: table - Caption font configuration
Get global caption font configuration.
The following functions exist in source but are commented out and cannot be used:
-- Commented out in addonapi.lua
-- Global_UpdateHeadTopPosition(dwID, nTargetType)