Jump to content

MOOSE AI_PATROL_ZONE Detected EVENT, can I do a global event handler for this?


Recommended Posts

Hey Folks,

Looking for a little lua/MOOSE help.  Looking at the documentation I believe there is a "Detect" event raised by the AI_PATROL_ZONE class when a aircraft being controlled by a AI_CAP_ZONE detects a bogie.  I am able to have a function that works like:

function AICapZone:OnAfterDetected(Controllable,From,Event,To)
	MESSAGE:New("In OnAfterDetected Function: "..Controllable.GroupName, 25):ToAll()
end

but I am kicking off several caps, via another function and thought I could handle this event globally.

 

 I have successfully done this for other DCS events like this:

-- Handles Init for clients as they enter mission.
Birth_Event_Handler = EVENTHANDLER:New()
Birth_Event_Handler:HandleEvent(EVENTS.Birth)
function Birth_Event_Handler:OnEventBirth(EventData)
	if EventData.IniPlayerName then
		ClientInit( EventData.IniGroup )
	end
end

but my attempts to try and handle the "AI_PATROL_ZONE:DETECT" event have failed.

 

Am I misunderstanding something? Any help is appreciated!

~Thump.

 

Computer Specs:

i7-6700K@4.00GHz, 32GB, 850 EVO 1TB, GTX 1080 Ti, Samsung Odyssey VR

[sIGPIC][/sIGPIC]

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...