Jump to content

Recommended Posts

Posted

I'm helping a friend with some mission building, and one thing we'd like to have is a trigger that fires when a specific airbase has been killed. So far I'm not having any luck getting at this information via scripting. I'm pretty sure in my test mission, the airbase is actually being killed, because it's reported as dead in the debriefing.

 

Am I missing an easy way to determine if an airbase is alive or dead? Or do I need to use event handlers to catch all dead objects and see if the ID is the one for the Airfield (or use MIST to do the equivalent of this)?

 

Here's what I've looked at so far:

 

The Airbase class is derived from CoalitionObject, which is derived from Object.

 

Object has an isExist() function, but this seems to return true even after the airbase has been killed.

 

Object.Desc contains a life value, but this seems to be the initial life points of the Airbase and stays at 1000 all the time.

 

CoalitionObject only adds coalition and country data to Object. Airbase only adds a category to CoalitionObject. So no new data items are added that could be checked.

 

Unit has a getLife() function that returns the current life points of a Unit, but Airbase is not derived from Unit. Airbase does add a getUnit() function, but apparently that is only for ships (carriers).

  • Recently Browsing   0 members

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