mirror of
https://github.com/FlightControl-Master/MOOSE_MISSIONS.git
synced 2026-08-24 07:13:55 +00:00
Initial
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
---
|
||||
-- Name: EVT-201 - GROUP OnEventHit Example
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 08 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the planes shooting the missile.
|
||||
-- 2. Observe when the planes shoots the missile, and hit the group Tanks A, a dcs.log entry is written in the logging.
|
||||
-- 3. Check the contents of the fields of the S_EVENT_HIT entry.
|
||||
-- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit.
|
||||
-- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit.
|
||||
|
||||
TanksGroup = GROUP:FindByName( "Group Tanks A" )
|
||||
|
||||
TanksGroup:HandleEvent( EVENTS.Hit )
|
||||
|
||||
function TanksGroup:OnEventHit( EventData )
|
||||
|
||||
self:E( "I just got hit and I am part of " .. EventData.TgtGroupName )
|
||||
EventData.TgtUnit:MessageToAll( "I just got hit and I am part of " .. EventData.TgtGroupName, 15, "Alert!" )
|
||||
end
|
||||
|
||||
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,10 @@
|
||||
$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 ..
|
||||
@@ -0,0 +1,7 @@
|
||||
$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