PhysicsEnvironment
Allows access to information about the local physics environment. If in a dungeon, its the entire dungeon environment. If in a building, it will be the building and outside landblocks if they are visible. If outside, it will be all adjacent landblocks.
Fields:
CanSeeOutside boolean
True if you can see outside from your character's location
CurrentLandblock number
Current landblock your character is in (landcell 0xFFFF0000)
CurrentLandcell number
Current landcell your character is in
IsDungeon boolean
True if your character is inside a dungeon. This does not count buildings.
IsInside boolean
Wether your character is inside or not. Inside is buildings / dungeons.
IsOutside boolean
Wether or not your character is outside. Outside meaning on the landscape, not in a building or dungeon.
VisibleLandblocks number[]
A list of landblocks visible from your character's location. This does not mean you have a direct line of sight, but rather that it is close enough to not be despawned by the client.
VisibleLandcells number[]
A list of landcells that are visible from your characters location. This does not mean you have a direct line of sight, but rather that it is close enough to not be despawned by the client.
Methods:
GetPropertyKeys() : string[]
Returns a list of strings of all public property / field names. Useful for reflection on UserData in lua scripts
IsLandcellVisible(landcell: number) : boolean
Check if the given landcell id is visible. This does not mean you have a direct line of sight, but rather that it is close enough to not be despawned by the client.
Name | Type | Default | Summary |
landcell | number | The landcell to check |
ToString() : string
Returns a string that represents the current object.