Page 1 of 1

How to cancel damage/destroy on an acft - Invincible mode

Posted: Sun Feb 26, 2023 7:49 pm
by Cheche
Hello everyone,

I need your help for a simulation scenario please.

Basicaly, i have an aircraft flying. A SAM shooting at it. SAM hit and Destroy the aircraft.
But ... i want this aircraft to remain "alive" and to continue flying. So either cancel all damages &/or destruction. The goal is to have something like "invicible mode".

I've tried to set up an event with Damage trigger (UnitDamaged) and Lua Script action (with SE_SetUnitDamage & UnitX) but it does not work...

Any idea how to do that ?

Thanks by advance.

YH

Re: How to cancel damage/destroy on an acft - Invincible mode

Posted: Mon Feb 27, 2023 1:23 am
by KnightHawk75
Cheche wrote: Sun Feb 26, 2023 7:49 pm Hello everyone,

I need your help for a simulation scenario please.

Basicaly, i have an aircraft flying. A SAM shooting at it. SAM hit and Destroy the aircraft.
But ... i want this aircraft to remain "alive" and to continue flying. So either cancel all damages &/or destruction. The goal is to have something like "invicible mode".

I've tried to set up an event with Damage trigger (UnitDamaged) and Lua Script action (with SE_SetUnitDamage & UnitX) but it does not work...

Any idea how to do that ?

Thanks by advance.

YH
You kinda can't generally.
With ships and some facilities most of the time you can usually catch it in time while sinking or when less then 100% upon the initial damage event, assuming the hitting munition isn't wildly overpowered in relation to the unit's damage points and armor. Then use lua like you wanted to reverse both the % damage, and restore all the destroyed components...(I assume you're attempting that as well, or at least doing it for engines) and not just the % value. You can get that list you need to restore via unit.components. Thing is often but not always with aircraft (at least in the past) it rarely works because the initial damage is already 100%, meaning the unit is technically already destroyed, even if the destroyed event hasn't happened yet because it quickly follows the dmg event in the same cycle. Now for things that use % components for DP% it's more variable. You could maybe try giving it a bunch of dummy mounts and other components, so that there is at least more stuff to soak up the initial random damage such that the first damage even is something less then 100%, but it may not work well if their is a direct head with high powered warhead,etc.

Probably not very helpful but there it is.

Re: How to cancel damage/destroy on an acft - Invincible mode

Posted: Mon Feb 27, 2023 5:56 am
by Cheche
Thanks for your answer.
Indeed it's what i thought what happened. So the only way is to modify either the damage point of the ammo or of the target in order to let it survive and then repair it with event(trigger and action).
Does DP is modifiable on C.PE ?

Re: How to cancel damage/destroy on an acft - Invincible mode

Posted: Mon Feb 27, 2023 11:27 am
by KnightHawk75
Cheche wrote: Mon Feb 27, 2023 5:56 am Thanks for your answer.
Indeed it's what i thought what happened. So the only way is to modify either the damage point of the ammo or of the target in order to let it survive and then repair it with event(trigger and action).
Does DP is modifiable on C.PE ?
In CPE (depending on license) you can edit the database for facility\ship\etc damage, but aircraft I believe are still dp=1.0 component % based (idk for sure I don't have a current license to CPE, but I assume it's the same model so to spreak). HOWEVER since in CPE you can export to XML ...do that, and then you can probably try changing the DP entry for the specific unit's entry which is save there as I recall (from when we used to be able to look at saves) of 1 or 1.0 to like 15000 and then I think it will switch to damage point reduction mode and you'd catch it in-time nearly every time (short of maybe nuke right on top of it).

Re: How to cancel damage/destroy on an acft - Invincible mode

Posted: Mon Feb 27, 2023 8:24 pm
by michaelm75au
In CPE, there are other ways to do this. I would suggest following up thru the CPE support channel.

Re: How to cancel damage/destroy on an acft - Invincible mode

Posted: Tue Feb 28, 2023 8:15 pm
by Cheche
Thanks lot for all your answer. Will see how it gonna work on CPE.