Lua access to ships in system
Posted: Tue Jan 06, 2015 8:47 pm
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
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