weixin_39824529
weixin_39824529
2020-12-27 18:15

Shark fixes

Includes tear downs for hooks and OSD in shark missions, not sure if they created the bug reported about them (#598) but maybe? (I don't know enough about state maintenance in Lua).

Also cleaned up mission eight (sh07), although, on second thoughts, the error might be being created by mission seven (sh06), but it's done now - proofread, odd typo etc.

Added random systems for where to find the pirates you need to kill - initially they are three to seven jumps away; change the variables min and max to alter this - as well as changing the way the pirates' names are made not to clash (in that unlikely scenario) to be cleaner.

One regression is that the first pirate no longer idles around a planet - I didn't have time to make sure the systems had to have planets as well as picking a planet for him to idle around... didn't seem like an issue and idle() was left in if someone wants to add it back in or I find more time later :)

该提问来源于开源项目:naev/naev

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

7条回答

  • weixin_39840733 weixin_39840733 4月前

    Shouldn't the idle hook be commented out then? I mean it will be throwing errors as it is now right? Without an idle hook they'll also fly away won't they?

    点赞 评论 复制链接分享
  • weixin_39824529 weixin_39824529 4月前

    Shouldn't the idle hook be commented out then? I mean it will be throwing errors as it is now right?

    Oops! :/ yes, I'll fix that...

    Without an idle hook they'll also fly away won't they?

    That confused me a little because as I read it only the first pirate uses the idle hook whereas the second and third don't, though at present the pirates only appear when you appear in the system so they should be huntable... though maybe they could fly away and not be interested in fighting you (e.g. you are pirate friendly (though doing this series of missions and staying pirate friendly seems unlikely (though not impossible I guess))). I guess if they might fly away then it'll need the work put in to choose systems that have planets, find the name of a planet there and idle the pirate around it... can't guarentee the little one will let me have the time atm. Will have a look at this again and see if I can't get it to work as intended - would be nice to know it would fix the bug report of course! ;)

    点赞 评论 复制链接分享
  • weixin_39824529 weixin_39824529 4月前

    Without an idle hook they'll also fly away won't they?

    A reread suggests to me that they are all using the idle funcion but the second two sets of pirates are just flying around the point in space where the planet was that the first pirate originally was flying around? I think? Dunno how easy that would make them to find so it does look like the better idle routine is the way to go?

    点赞 评论 复制链接分享
  • weixin_39728213 weixin_39728213 4月前

    Hello, For the pirate Cruisers, they won't go away because they have to patrol 3 points before leaving the system (because of their AI). Maybe you could use pilot.setHostile() and set the player visible for NPCs in order to make them attack the player. The first pirate (the one with the Gawain) will try to leave ASAP because he hasn't a patrol AI. That's why you need to find a way to make him wait for the player to engage him (except if you want to make this mission very difficult)

    点赞 评论 复制链接分享
  • weixin_39824529 weixin_39824529 4月前

    Hello :)

    For the pirate Cruisers, they won't go away because they have to patrol 3 points before leaving the system (because of their AI). Maybe you could use pilot.setHostile() and set the player visible for NPCs in order to make them attack the player. The first pirate (the one with the Gawain) will try to leave ASAP because he hasn't a patrol AI. That's why you need to find a way to make him wait for the player to engage him (except if you want to make this mission very difficult)

    Thank you for the info. I've never dealt with pilot AI before hence my total lack of understanding, apologies... I had hoped there would be a quick fix but apparently not so much... I'll delve into the mechanics of it all and see if we can't come up with something more appropriate... maybe have him near the sun so he can sun bath with his escorts patrolling around him (from memory he is supposed to be on holiday after all :P

    点赞 评论 复制链接分享
  • weixin_39824529 weixin_39824529 4月前

    Received a comprehensive fix from Nenau for the idle-hook problem - we think this is now good to go... other thoughts?

    点赞 评论 复制链接分享
  • weixin_39840733 weixin_39840733 4月前

    Looks good, thanks!

    点赞 评论 复制链接分享

相关推荐