pioneerspacesim / pioneer

A game of lonely space adventure
https://pioneerspacesim.net
1.6k stars 363 forks source link

Add onEnterAtmosphere event or similar to Lua. #1825

Open ghost opened 11 years ago

ghost commented 11 years ago

Add an onEnterAtmosphere or similar to Lua. Would be useful in spawning opportunistic pirates that wait until ships are slowed down by atmosphere to swoop in and attack.

robn commented 11 years ago

onFrameChanged can almost do what you want here, but I wouldn't mind it if we removed it in favour of an onEnterAtmosphere or similar. I don't like that the concept of frames are exposed to Lua.

ghost commented 11 years ago

I've attempted using that, however, the frame changes too far out from the planet to be useful in a scenario like this. onEnterAtmosphere could possibly be used to prevent certain ships from landing on planets as well?

Zordey commented 11 years ago

I was thinking of requesting something similar so that atmospheric wings could be opened / closed on ships when entering / leaving a planets atmosphere.

Would also need an onLeaveAtmosphere event and an inAtmosphere query?