Sorry I forgot an important sentence... is it possible to do it in Lua?
edit: Basically this is what I'm aiming for:
What I want to have the model maker write (each ship class get's it's own set of functions. aka... RegisterBearcat, RegisterBlackWidow, RegisterHellcat....etc)
function ShipType:MyShipClassLandGear (isOpening)
if (isOpening)
-- do opening stuff, choose which subsystem group to activate (for fancy stuff)
else
-- do closing stuff, choose which subsystem group to activate (for fancy stuff)
end
end
and only have to write this too (same as above, each ship class gets their own):
function ShipType:RegisterMyShipClass (stuff.....)
-- Do subsystem animation registeration (define what is landing gear, thrust vectoring, thrust nozzles...etc)
self:LandingGearFunction = self.MyShipClassLandingGear
end
then just call OpenLandingGear (ship name) via FRED
then the prewritten code (stuff i'm doing now) will automatically handle it via:
function OpenLandingGear (name)
-- Grab the necessary information (ship, triggered group [landing gear], etc....)
-- theShip is of type ShipType
theShip:OpenLandingGear (isOpening)
end
That way you don't have to write a massive if-then-else for each ship class.
This whole thing is rather complicated using triggers and ship classes. but it'll allow for not only each type of ship to have it's own information (in fact each ship has it's own data), but more importantly it allows for chaining animations together to make more advanced effects than what the built-in rotation animation can do.