Capturing enemy units?

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Capturing enemy units?

Post by GottaLove88s »

How does BA track which team a unit belongs to?

For a scenario I'm working on, I'd like to make it possible for infantry units to capture certain types of enemy units.

These new 'capture' attacks must be made from an adjacent square, like assaults. BA would then run the same 'assault' code to determine whether the attack was successful.

However, if the 'capture' is successful, the attacking infantry survives and the captured unit (for example a 251/1, a truck or an ATG) becomes reflagged to the same team as the attacker.

Is this possible?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9881
Joined: Wed Mar 23, 2005 10:35 pm

Re: Capturing enemy units?

Post by pipfromslitherine »

By team, I assume you mean side? There isn't any way to currently change the side of a unit. Other mods have handled it by destroying and removing the unit and replacing it with a new unit on the 'correct' side.

Cheers

Pip
follow me on Twitter here
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Capturing enemy units?

Post by GottaLove88s »

pipfromslitherine wrote:By team, I assume you mean side? There isn't any way to currently change the side of a unit. Other mods have handled it by destroying and removing the unit and replacing it with a new unit on the 'correct' side.

Cheers

Pip
Thanks Pip, That approach sounds effective. Can you recommend a scenario to examine, to investigate their code?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9881
Joined: Wed Mar 23, 2005 10:35 pm

Re: Capturing enemy units?

Post by pipfromslitherine »

Sorry, can't recall off the top of my head. It's not very common. I just recall a discussion on the forums on how to do it :)

Cheers

Pip
follow me on Twitter here
Richcat
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 219
Joined: Sun Nov 07, 2010 10:09 pm

Re: Capturing enemy units?

Post by Richcat »

I remember Merr doing something with troop units
Capture for his Rescue the prisoner modviewtopic.php?f=105&t=19349z that might be of help and Unit switching sides
viewtopic.php?f=104&t=19309
Cheers
Richcat
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Capturing enemy units?

Post by GottaLove88s »

Thanks Richcat! That's super helpful...

With the Dieppe v1.03 fix/upgrade out today, I'm 'grounded' on modding/designing for a while...

But as soon as upcoming challenges are survived, I'd like to try tagging your code onto Dieppe v1.04... to permit Allied raiders to capture German trucks and 251s...
Might help them to get to those inland VP flags...

:-)

PS. How's your well deserved holiday?... Must be very moving... Would love to see your photos...
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Ranger
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 188
Joined: Fri Mar 15, 2013 6:24 am

Re: Capturing enemy units?

Post by Ranger »

awesome... (but don't get in trouble with the wife).
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Capturing enemy units?

Post by GottaLove88s »

Is the Pope a Catholic? Do bears etc... :D
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Post Reply

Return to “Battle Academy : Modders Corner ”