mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/master' into develop
# Conflicts: # Moose Development/Moose/Core/Set.lua # Moose Development/Moose/Core/Zone.lua
This commit is contained in:
commit
07c86ec2dc
@ -591,4 +591,3 @@ function MESSAGE:ToSRSAll(frequency,modulation,gender,culture,voice,volume,coord
|
|||||||
self:ToSRS(frequency,modulation,gender,culture,voice,coalition.side.NEUTRAL,volume,coordinate)
|
self:ToSRS(frequency,modulation,gender,culture,voice,coalition.side.NEUTRAL,volume,coordinate)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -6198,30 +6198,21 @@ do -- SET_ZONE
|
|||||||
-- @param Wrappe.Controllable#CONTROLLABLE Objects Object or Objects to watch, can be of type UNIT, GROUP, CLIENT, or SET\_UNIT, SET\_GROUP, SET\_CLIENT
|
-- @param Wrappe.Controllable#CONTROLLABLE Objects Object or Objects to watch, can be of type UNIT, GROUP, CLIENT, or SET\_UNIT, SET\_GROUP, SET\_CLIENT
|
||||||
-- @return #SET_ZONE self
|
-- @return #SET_ZONE self
|
||||||
-- @usage
|
-- @usage
|
||||||
-- Create a SET_ZONE and have it look after a SET_GROUP of objects:
|
-- -- Create a new zone and start watching it every 5 secs for a certain GROUP entering or leaving
|
||||||
--
|
-- local triggerzone = ZONE:New("ZonetoWatch"):Trigger(GROUP:FindByName("Aerial-1"))
|
||||||
-- local groupset = SET_GROUP:New():FilterPrefixes("Aerial"):FilterStart(
|
--
|
||||||
-- local zoneset = SET_ZONE:New():FilterPrefixes("Target Zone"):FilterOnce():Trigger(groupset)
|
-- -- function to handle FSM event "EnteredZone"
|
||||||
--
|
-- function triggerzone:OnAfterEnteredZone(From,Event,To,Group)
|
||||||
-- -- Draw on the map
|
-- MESSAGE:New("Group has entered zone!",15):ToAll()
|
||||||
-- zoneset:ForEachZone(
|
-- end
|
||||||
-- function(zone)
|
--
|
||||||
-- zone:DrawZone(-1, {0,1,0}, Alpha, FillColor, FillAlpha, 4, ReadOnly)
|
-- -- function to handle FSM event "LeftZone"
|
||||||
-- end
|
-- function triggerzone:OnAfterLeftZone(From,Event,To,Group)
|
||||||
-- )
|
-- MESSAGE:New("Group has left zone!",15):ToAll()
|
||||||
--
|
-- end
|
||||||
-- -- function called when a controllable enters
|
--
|
||||||
-- function zoneset:OnAfterEnteredZone(From,Event,To,Controllable,Zone)
|
-- -- Stop watching the zone
|
||||||
-- MESSAGE:New("Group "..Controllable:GetName() .. " entered zone "..Zone:GetName(),10,"Set Trigger"):ToAll()
|
-- triggerzone:TriggerStop()
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- -- function called when a controllable leaves
|
|
||||||
-- function zoneset:OnAfterLeftZone(From,Event,To,Controllable,Zone)
|
|
||||||
-- MESSAGE:New("Group "..Controllable:GetName() .. " left zone "..Zone:GetName(),10,"Set Trigger"):ToAll()
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- -- Stop after 1 hour
|
|
||||||
-- zoneset:__TriggerStop(3600)
|
|
||||||
function SET_ZONE:Trigger(Objects)
|
function SET_ZONE:Trigger(Objects)
|
||||||
--self:I("Added Set_Zone Trigger")
|
--self:I("Added Set_Zone Trigger")
|
||||||
self:AddTransition("*","TriggerStart","TriggerRunning")
|
self:AddTransition("*","TriggerStart","TriggerRunning")
|
||||||
|
|||||||
@ -587,7 +587,7 @@ end
|
|||||||
-- end
|
-- end
|
||||||
--
|
--
|
||||||
-- -- Stop watching the zone after 1 hour
|
-- -- Stop watching the zone after 1 hour
|
||||||
-- triggerzone:__TriggerStop(2600)
|
-- triggerzone:__TriggerStop(3600)
|
||||||
function ZONE_BASE:Trigger(Objects)
|
function ZONE_BASE:Trigger(Objects)
|
||||||
--self:I("Added Zone Trigger")
|
--self:I("Added Zone Trigger")
|
||||||
self:SetStartState("TriggerStopped")
|
self:SetStartState("TriggerStopped")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user