Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Damage question

 
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 >> Damage question Page: [1]
Login
Message << Older Topic   Newer Topic >>
Damage question - 2/14/2021 12:28:13 AM   
Gunner98

 

Posts: 5508
Joined: 4/29/2005
From: The Great White North!
Status: offline
Hay guys I'm fiddling with unit damage:

ScenEdit_SetUnitDamage({side='NATO', guid='aa9559a7-0c1e-4afd-8da4-067839800a5c', dp=1000})

The unit in question is a Runway and this puts it at 83% damage which is fine.

The problem is fixing the runway, I've tried several methods but none seem to work:

ScenEdit_SetUnitDamage({side='NATO', guid='aa9559a7-0c1e-4afd-8da4-067839800a5c', 'none'})
ScenEdit_SetUnitDamage({side='NATO', guid='aa9559a7-0c1e-4afd-8da4-067839800a5c', 'dp=1'})
ScenEdit_SetUnitDamage({side='NATO', guid='aa9559a7-0c1e-4afd-8da4-067839800a5c', {'runway', 'none'})

Etc

I somehow want to set the 'Overall Damage' to '0' - Just not quite sure how to do it.

Any advice?

B

_____________________________

Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
Post #: 1
RE: Damage question - 2/14/2021 6:44:23 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
ScenEdit_SetUnitDamage({side='NATO', guid='aa9559a7-0c1e-4afd-8da4-067839800a5c', dp=0})

_____________________________

Michael

(in reply to Gunner98)
Post #: 2
RE: Damage question - 2/14/2021 2:40:13 PM   
Gunner98

 

Posts: 5508
Joined: 4/29/2005
From: The Great White North!
Status: offline
Yeah I tried that with no luck. Just did it again, same result.

It seems that the initial command that inflicts damage affects the overall unit but applies the damage onto the 'runway' component. The command to repair or bring it back to '0' DP doesn't get applied to the component. That is just a guess

Tx

_____________________________

Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/

(in reply to michaelm75au)
Post #: 3
RE: Damage question - 2/14/2021 6:04:54 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
http://www.matrixgames.com/forums/fb.asp?m=4820766 (post #4 I have a sample there does it work for you as sample for this?, it shows running though all components.)


< Message edited by KnightHawk75 -- 2/14/2021 6:14:24 PM >

(in reply to Gunner98)
Post #: 4
RE: Damage question - 2/17/2021 9:59:21 AM   
Gunner98

 

Posts: 5508
Joined: 4/29/2005
From: The Great White North!
Status: offline
Thanks

I'll be able to take a good look this weekend. Appreciate the help

B

_____________________________

Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/

(in reply to KnightHawk75)
Post #: 5
RE: Damage question - 3/2/2021 7:26:20 PM   
Parel803

 

Posts: 579
Joined: 10/10/2019
From: Netherlands
Status: offline
Not sure if it's still wordt something but seems to work for me on a ship with: dp=-50

Little different print answer, has extra dp_percent_now='xx,x'

{ fires = 'NoFire', dp_percent = '7,5', flood = 'NoFlooding', startdp = '530', dp = 490 }
{ fires = 'NoFire', dp_percent = '18,9', dp = 520, flood = 'NoFlooding', startdp = '530', dp_percent_now = '1,9' } . Before and after executing I guess

with regards Gert-Jan

(in reply to Gunner98)
Post #: 6
RE: Damage question - 3/2/2021 11:40:08 PM   
Gunner98

 

Posts: 5508
Joined: 4/29/2005
From: The Great White North!
Status: offline
Wasn't able to get this working but have a fix. Will delete the runway and re-spawn it when needed.

I would like to figure this out for another scenario though, so the AI can get runways repaired faster.

_____________________________

Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/

(in reply to Parel803)
Post #: 7
RE: Damage question - 1/18/2022 2:18:01 PM   
Parel803

 

Posts: 579
Joined: 10/10/2019
From: Netherlands
Status: offline
Good afternoon,

An extra question on damage. Does anyone know what is the 'type' name to damage engineering/propulsion?

Could you state the dp in % instead of a nr. Probable not but just to make sure.

best regards GJ

< Message edited by Parel803 -- 1/18/2022 3:24:31 PM >

(in reply to Gunner98)
Post #: 8
RE: Damage question - 1/18/2022 9:12:38 PM   
KnightHawk75

 

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


An extra question on damage. Does anyone know what is the 'type' name to damage engineering/propulsion?

look in unit's components table for comp_type, usually it's 'Engine'.


(in reply to Parel803)
Post #: 9
RE: Damage question - 1/19/2022 11:41:15 AM   
Parel803

 

Posts: 579
Joined: 10/10/2019
From: Netherlands
Status: offline
Thank you

(in reply to KnightHawk75)
Post #: 10
RE: Damage question - 1/19/2022 2:13:43 PM   
wirthlin

 

Posts: 2
Joined: 12/27/2020
Status: offline
Thank you for the sample code Knighthawk! For some reason, I had always thought ScenEdit_SetUnitDamage() only applied to components of units and not the units themselves. And specifying a negative dp for repairs never crossed my mind. Tried it on a simple scenario and it works great!

That really opens up some interesting possibilities.

(in reply to KnightHawk75)
Post #: 11
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Damage question 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.969