Jump to content

Recommended Posts

Posted

Hi, I have been trying to get Lua Predicate to work with the following code (using MOOSE):

 

LoopUnit = UNIT:FindByName( "Pilot #777" )
LoopUnit:HandleEvent( EVENTS.EngineShutdown )
function LoopUnit:OnEventEngineShutdown( EventData )
return true
end

 

The problem I'm having is that this is not triggering the action that sets Flag 7301 to ON (FLAG ON (7301) in Actions).

 

If I replace the "return true" with "trigger.action.setUserFlag('7301', true)", it works and sets the flag to true.

 

So my question is why the above code is not returning the true value for the Lua Predicate to work and execute the corresponding Action??

 

 

Thanks

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...