Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Diver from Submarine

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Diver from Submarine Page: [1]
Login
Message << Older Topic   Newer Topic >>
Diver from Submarine - 2/13/2022 2:15:03 PM   
Parel803

 

Posts: 579
Joined: 10/10/2019
From: Netherlands
Status: offline
Good afternoon,
I got this from the Scenario: SakuraBlue by Rory N, very neat. I plucked this from the lua docs made by Rory (thx). A question that came up was how to get two instead of one option to drop forces ashore. I guess it is in the Key for deployed but don't know how to change that. All credits tot RN. If I should tweak it somewere, happy to here. The original docs contains much more.
regards GJ


Attachment (1)
Post #: 1
RE: Diver from Submarine - 2/13/2022 7:43:28 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
Attached in version where you are asked how many divers you want from the selected sub (1-10, change as you desire).
It also corrects areas where the original fell short (detects > 1 unit selected,etc now), adds a function you can use to easily clear the storage keys during development, and adjusts things such that GetUnit isn't called multiple times, but instead is obtained once and passed onto funcs that need it, added params to the 'diver' generation, along with defaults that match the original.

att: SelectedSubDropsDiversOffOnLand_514009.zip

Attachment (1)

< Message edited by KnightHawk75 -- 2/13/2022 7:44:00 PM >

(in reply to Parel803)
Post #: 2
RE: Diver from Submarine - 2/13/2022 8:00:45 PM   
Parel803

 

Posts: 579
Joined: 10/10/2019
From: Netherlands
Status: offline
KH,
I realize I ask a lot of Q's. Thanks again for the answer.
regards GJ

(in reply to KnightHawk75)
Post #: 3
RE: Diver from Submarine - 2/14/2022 4:41:22 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline

quote:

ORIGINAL: Parel803

KH,
I realize I ask a lot of Q's. Thanks again for the answer.
regards GJ

No worries, you're welcome.

(in reply to Parel803)
Post #: 4
RE: Diver from Submarine - 2/14/2022 7:28:23 AM   
Parel803

 

Posts: 579
Joined: 10/10/2019
From: Netherlands
Status: offline
Thank you, much appriciated.
Follow up from first one. If want to put two recons ashore but not at the same time?
When I try that I get: There was aproblem with your selection. Ensure that you have selected a single submarine which has not yet deployed a dive team.

I found that mesage line but was wondering were to find the fact that it can only happen once? And if that can be set to e.g. two teams, so twice a drop?

regards GJ

(in reply to KnightHawk75)
Post #: 5
RE: Diver from Submarine - 2/14/2022 5:39:06 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
quote:

ORIGINAL: Parel803

Thank you, much appriciated.
Follow up from first one. If want to put two recons ashore but not at the same time?
When I try that I get: There was aproblem with your selection. Ensure that you have selected a single submarine which has not yet deployed a dive team.

I found that mesage line but was wondering were to find the fact that it can only happen once? And if that can be set to e.g. two teams, so twice a drop?

regards GJ

quote:

Follow up from first one. If want to put two recons ashore but not at the same time?


Areas that validate and check against the storage keys is where you want to look.
Probably minimal amount of work if you just want to disable that is just to remove the calls to SubmarineSelectionIsValidForDivers();
so change
	  if (SubmarineSelectionIsValidForDivers(selectedSubmarine)) and ConfirmSpecialAction('Deploy dive team from '..selectedSubmarine.name) then
	    if DeployDiversFromSubmarine(selectedSubmarine) then
                ScenEdit_SetKeyValue('Swimmers_'..selectedSubmarine.guid,'deployed')  -- delete this line for >1 SpecOps team
                  return true;
              end
	  else -- failed validation.

to
         if ConfirmSpecialAction('Deploy dive team from '..selectedSubmarine.name) then
	     if DeployDiversFromSubmarine(selectedSubmarine) then return true; end
	 else -- failed validation.


I did not test ^^ that before posting, but I think it should cause what you want without causing other problems.


< Message edited by KnightHawk75 -- 2/14/2022 5:43:37 PM >

(in reply to Parel803)
Post #: 6
RE: Diver from Submarine - 2/14/2022 7:43:03 PM   
Parel803

 

Posts: 579
Joined: 10/10/2019
From: Netherlands
Status: offline
again thx, also for tomorrow :-)
Works great thx

< Message edited by Parel803 -- 2/15/2022 3:40:22 PM >

(in reply to KnightHawk75)
Post #: 7
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Diver from Submarine Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.656