Added Init Methods to set Unit Positions on Spawn

This commit is contained in:
Applevangelist
2023-03-30 12:22:30 +02:00
parent f093fef8f8
commit 42d5421cd8
3 changed files with 79 additions and 7 deletions

View File

@@ -110,11 +110,13 @@ end
--@param #number Radius (optional) Search radius around coordinate, defaults to 100
--@return #SCENERY Scenery Object or `nil` if it cannot be found
function SCENERY:FindByName(Name, Coordinate, Radius)
local radius = Radius or 100
local name = Name or "unknown"
local scenery = nil
BASE:T({name, radius, Coordinate:GetVec2()})
---
-- @param Core.Point#COORDINATE coordinate
-- @param #number radius
@@ -170,6 +172,7 @@ function SCENERY:FindByZoneName( ZoneName )
zone = ZONE:FindByName(ZoneName)
end
local _id = zone:GetProperty('OBJECT ID')
BASE:T("Object ID ".._id)
if not _id then
-- this zone has no object ID
BASE:E("**** Zone without object ID: "..ZoneName.." | Type: "..tostring(zone.ClassName))