Another Damage Question
Posted: Sun Mar 14, 2021 12:19 pm
Playing around with damaging components a little. Setup this code:
ScenEdit_SetUnitDamage({side='NATO', unitname='D 615 FS Jean Bart', fires=1, components={ {'Hangar (1x Small Aircraft (0-12m Long))','Heavy'}, {'type',type='sensor',1} } })
ScenEdit_SetUnitDamage({side='NATO', unitname='D 615 FS Jean Bart', components={ {'Pad (1x Small Aircraft (0-12m Long))','Heavy'}}})
This works fine, but have a couple questions:
a. When I try to put both components on one line it gets messed up. Have tried several different ways and it is probably only a syntax issue but - Do they need to be on separate lines?
b. I don't really understand the numbers for the other bits - for fires the '1' seems to indicate moderate fire, but changing it to 3 or 400 doesn't seem to make a difference, How is that supposed to work.
c. For the sensor type, the '1' seems to indicate that one random sensor will be damaged, but changing that number messes stuff up. How do I get multiple random sensors damaged (like 3 or 4)?
d. There is a helicopter in the hangar which escapes undamaged. This event is going to happen randomly, the helo may be there or it may not. I guess the simplest solution would be to leave things alone: With a damaged pad, the helo can't take off anyway and if it is airborne it will land somewhere else or run out of fuel. But is there a simple way of saying - if helo is present than destroy it? Will the fire do that for me anyway?
Thanks guys.
ScenEdit_SetUnitDamage({side='NATO', unitname='D 615 FS Jean Bart', fires=1, components={ {'Hangar (1x Small Aircraft (0-12m Long))','Heavy'}, {'type',type='sensor',1} } })
ScenEdit_SetUnitDamage({side='NATO', unitname='D 615 FS Jean Bart', components={ {'Pad (1x Small Aircraft (0-12m Long))','Heavy'}}})
This works fine, but have a couple questions:
a. When I try to put both components on one line it gets messed up. Have tried several different ways and it is probably only a syntax issue but - Do they need to be on separate lines?
b. I don't really understand the numbers for the other bits - for fires the '1' seems to indicate moderate fire, but changing it to 3 or 400 doesn't seem to make a difference, How is that supposed to work.
c. For the sensor type, the '1' seems to indicate that one random sensor will be damaged, but changing that number messes stuff up. How do I get multiple random sensors damaged (like 3 or 4)?
d. There is a helicopter in the hangar which escapes undamaged. This event is going to happen randomly, the helo may be there or it may not. I guess the simplest solution would be to leave things alone: With a damaged pad, the helo can't take off anyway and if it is airborne it will land somewhere else or run out of fuel. But is there a simple way of saying - if helo is present than destroy it? Will the fire do that for me anyway?
Thanks guys.