mirror of
https://github.com/FlightControl-Master/MOOSE_MISSIONS.git
synced 2026-08-22 06:44:43 +00:00
SPAWNSTATIC
- Added demo showing how to dynamically spawn FARPs - Renamed Simple Spawn demo
This commit is contained in:
+31
-31
@@ -1,31 +1,31 @@
|
|||||||
--- Name: SPS-100 - Simple Spawning
|
--- Name: SPS-100 - Simple Spawning
|
||||||
-- Author: FlightControl
|
-- Author: FlightControl
|
||||||
-- Date Created: 09 Apr 2017
|
-- Date Created: 09 Apr 2017
|
||||||
--
|
--
|
||||||
-- # Situation:
|
-- # Situation:
|
||||||
--
|
--
|
||||||
-- At Gudauta spawn a static.
|
-- At Gudauta spawn a static.
|
||||||
--
|
--
|
||||||
-- # Test cases:
|
-- # Test cases:
|
||||||
--
|
--
|
||||||
-- 1. Observe that the static is spawned.
|
-- 1. Observe that the static is spawned.
|
||||||
|
|
||||||
|
|
||||||
local ZonePosition = ZONE:New( "Position" )
|
local ZonePosition = ZONE:New( "Position" )
|
||||||
|
|
||||||
local SpawnBuilding = SPAWNSTATIC:NewFromStatic( "Building", country.id.GERMANY )
|
local SpawnBuilding = SPAWNSTATIC:NewFromStatic( "Building", country.id.GERMANY )
|
||||||
local SpawnBarrack = SPAWNSTATIC:NewFromStatic( "Barrack", country.id.GERMANY )
|
local SpawnBarrack = SPAWNSTATIC:NewFromStatic( "Barrack", country.id.GERMANY )
|
||||||
|
|
||||||
local ZonePointVec2 = ZonePosition:GetPointVec2()
|
local ZonePointVec2 = ZonePosition:GetPointVec2()
|
||||||
|
|
||||||
local Building = SpawnBuilding:SpawnFromZone( ZonePosition, 0 )
|
local Building = SpawnBuilding:SpawnFromZone( ZonePosition, 0 )
|
||||||
|
|
||||||
for Heading = 0, 360,60 do
|
for Heading = 0, 360,60 do
|
||||||
local Radial = Heading * ( math.pi*2 ) / 360
|
local Radial = Heading * ( math.pi*2 ) / 360
|
||||||
local x = ZonePointVec2:GetLat() + math.cos( Radial ) * 150
|
local x = ZonePointVec2:GetLat() + math.cos( Radial ) * 150
|
||||||
local y = ZonePointVec2:GetLon() + math.sin( Radial ) * 150
|
local y = ZonePointVec2:GetLon() + math.sin( Radial ) * 150
|
||||||
SpawnBarrack:SpawnFromPointVec2( POINT_VEC2:New( x, y ), Heading + 90 )
|
SpawnBarrack:SpawnFromPointVec2( POINT_VEC2:New( x, y ), Heading + 90 )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,10 +0,0 @@
|
|||||||
$dir = split-path -parent $MyInvocation.MyCommand.Definition
|
|
||||||
cd $dir
|
|
||||||
$file = Split-Path $dir -leaf
|
|
||||||
|
|
||||||
$dir
|
|
||||||
$file
|
|
||||||
|
|
||||||
cd "_unpacked"
|
|
||||||
. 7z a -r -y -tzip "..\$file.miz" *
|
|
||||||
cd ..
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
$dir = split-path -parent $MyInvocation.MyCommand.Definition
|
|
||||||
cd $dir
|
|
||||||
$file = Split-Path $dir -leaf
|
|
||||||
Remove-Item .\_unpacked -Force -Recurse
|
|
||||||
md "_unpacked"
|
|
||||||
cd "_unpacked"
|
|
||||||
. 7z x -r -y "..\$file.miz" *
|
|
||||||
Reference in New Issue
Block a user