class Location¶
-
class
Location¶
Functions¶
Methods¶
Location:ApplyEffect(durtype, eff, duration)¶Applies an effect to a location.
Parameters:
- durtype (int) – DURATION_TYPE_*
- eff (
Effect) – Effect to apply.- duration (float) – Duration in seconds. If not passed the visual will be applied as DURATION_TYPE_INSTANT.
Location:ApplyVisual(vfx, duration)¶Applies a visual effect to a location
Parameters:
- vfx (int) – VFX_*
- duration (float) – Duration in seconds. If not passed the visual will be applied as DURATION_TYPE_INSTANT.
Location:GetNearestObject(mask, nth)¶Gets nearest object to location
Parameters:
- mask (int) – OBJECT_TYPE_*
- nth (int) – Which object to find.
Location:GetNearestCreature(type1, value1, nth, ...)¶Gets nearest creature to location.
Parameters:
- type1 (int) – First criteria type
- value1 (int) – First crieria value
- nth (int) – Nth nearest.
- type2 (int) – Second criteria type. (Default: -1)
- value2 (int) – Second criteria value. (Default: -1)
- type3 (int) – Third criteria type. (Default: -1)
- value3 (int) – Third criteria value. (Default: -1)
Location:ToString()¶Convert location to string
Location:Trap(type, size, tag, faction, on_disarm, on_trigger)¶Create square trap at location.
Parameters:
- type (int) – TRAP_BASE_TYPE_*
- size (float) – (Default 2.0)
- tag (string) – Trap tag. (Default: “”)
- faction (int) – Trap faction. (Default: STANDARD_FACTION_HOSTILE)
- on_disarm (string) – OnDisarm script. (Default: “”)
- on_trigger (string) – OnTriggered script. (Default: “”)
Location:SetTileMainLightColor(color1, color2)¶Sets the main light colors for a tile.
Parameters:
- color1 (int) – AREA_TILE_SOURCE_LIGHT_COLOR_*
- color2 (int) – AREA_TILE_SOURCE_LIGHT_COLOR_*
Location:SetTileSourceLightColor(color1, color2)¶Sets the source light color for a tile.
Parameters:
- color1 (int) – AREA_TILE_SOURCE_LIGHT_COLOR_*
- color2 (int) – AREA_TILE_SOURCE_LIGHT_COLOR_*
Location:GetTileMainLight1Color()¶Determines the color of the first main light of a tile.
Return type: AREA_TILE_SOURCE_LIGHT_COLOR_*
Location:GetTileMainLight2Color()¶Determines the color of the second main light of a tile.
Return type: AREA_TILE_SOURCE_LIGHT_COLOR_*
Location:GetTileSourceLight1Color()¶Determines the color of the first source light of a tile.
Return type: AREA_TILE_SOURCE_LIGHT_COLOR_*
Location:GetTileSourceLight2Color()¶Determines the color of the second source light of a tile.
Return type: AREA_TILE_SOURCE_LIGHT_COLOR_*
Location:GetArea()¶Get area from location.
Location:GetDistanceBetween(to)¶Gets distance between two locations.
Parameters:
- to (
Location) – The location to get the distance from.
Location:GetFacing()¶Gets orientation of a location
Location:GetPosition()¶Gets position vector of a location