Hello,
I've been looking into mission scripting by spending some time in the in-game console (to better understand concepts etc.). I have gotten most information about the game-specific lua API from this page: http://eatenbyagrue.org/f/pioneer/codedoc.
I can pull most of the basic information (player, player ship info, bodies, paths, etc.). But what I simply could not figure out is how to access all active ships. I can get a list via space.getbodies(). But I would like to access the actual ship class for each ship (like I can for the player ship via game.player), not just the physical body class. What am I missing? Probably something really simple...
Thank you for a great game,
Claudius
Lua access to ships in system
Re: Lua access to ships in system
The Ship class derives from Body. So, for ships, the objects returned by Space.GetBodies() will be Ship objects.
Re: Lua access to ships in system
Thank you - I don't know how I missed that. Just tried and you are right. Thank you for the quick reply!