mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Progress
This commit is contained in:
parent
0c5e1db39c
commit
8ca74ee7db
File diff suppressed because it is too large
Load Diff
8
Moose Development/Moose/Moose_Test_CARGO_Pickup.lua
Normal file
8
Moose Development/Moose/Moose_Test_CARGO_Pickup.lua
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
local Mission = MISSION:New( "Pickup Cargo", "High", "Test for Cargo Pickup", coalition.side.RED )
|
||||
|
||||
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||
local InfantryCargo = CARGO_UNIT:New( Mission, CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 300 )
|
||||
|
||||
local CargoCarrier = UNIT:FindByName( "CargoCarrier" )
|
||||
InfantryCargo:OnBoard( CargoCarrier )
|
||||
@ -79,9 +79,30 @@ function POSITIONABLE:GetVec2()
|
||||
if DCSPositionable then
|
||||
local PositionablePointVec3 = DCSPositionable:getPosition().p
|
||||
|
||||
local PositionablePointVec2 = {}
|
||||
PositionablePointVec2.x = PositionablePointVec3.x
|
||||
PositionablePointVec2.y = PositionablePointVec3.z
|
||||
local PositionableVec2 = {}
|
||||
PositionableVec2.x = PositionablePointVec3.x
|
||||
PositionableVec2.y = PositionablePointVec3.z
|
||||
|
||||
self:T2( PositionableVec2 )
|
||||
return PositionableVec2
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns a POINT_VEC2 object indicating the point in 2D of the POSITIONABLE within the mission.
|
||||
-- @param Positionable#POSITIONABLE self
|
||||
-- @return Point#POINT_VEC2 The 2D point vector of the POSITIONABLE.
|
||||
-- @return #nil The DCS Positionable is not existing or alive.
|
||||
function POSITIONABLE:GetVec2()
|
||||
self:F2( self.PositionableName )
|
||||
|
||||
local DCSPositionable = self:GetDCSObject()
|
||||
|
||||
if DCSPositionable then
|
||||
local PositionablePointVec3 = DCSPositionable:getPosition().p
|
||||
|
||||
local PositionablePointVec2 = POINT_VEC2:NewFromVec3( PositionablePointVec3 )
|
||||
|
||||
self:T2( PositionablePointVec2 )
|
||||
return PositionablePointVec2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user