Home   Help Search Login Register  

Author Topic: enemy keeping safe when in bomb shelter???  (Read 420 times)

0 Members and 1 Guest are viewing this topic.

Madmike

  • Guest
enemy keeping safe when in bomb shelter???
« on: 01 Apr 2003, 19:43:29 »
Hi everybody, I have a problem.
Im using the support pack that calls in artillery etc.  I want the player to attack a air field using the support pack but the problem I have is that it kills too many troops but i dont want to reduced the size of the explosions. Idealy I would like the enemy to run to the nearest bomb shelter or find some cover whilst the bombs are falling or the CAS is in sight or attacking. Also I would like the shelters(AKA the bunkers from a bunker pack i have) to survive nearly everything apart from a direct hit. WHen the attack has stop I the ememy then go back to there stand to positions ready for an attack

 I hope this makes some sense as its hard to explain :-\
« Last Edit: 01 Apr 2003, 19:49:23 by Madmike »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:enemy keeping safe when in bomb shelter???
« Reply #1 on: 01 Apr 2003, 20:02:58 »
It's very hard to find shelter from an arty stonk in OFP.

Possibly your best bet is to run a looping repair/heal script while the strike is on

? 0.3 < getdammage _unit < 0.9: _unit setdammage (getdammage _unit-0.3)

syntax guaranteed to be wrong, but hopefully you see what I'm getting at ... you don't resurrect dead units, but injured ones have a much better chance of surviving.    You can do the same trick with buildings.
Plenty of reviewed ArmA missions for you to play

Der_Richter

  • Guest
Re:enemy keeping safe when in bomb shelter???
« Reply #2 on: 02 Apr 2003, 00:10:12 »
Put:

while "a < 500" do {
if (_unit getDammage > 0.3 && this getDammage < 0.9)
then {_unit setDammage(_unit getDammage - 0.3)};  
a + 1;  
}

in a script.

Then put the following into all the units init-fields:

[this] exec "ScriptFileName"


That's how i would have done it. The soldiers and buildings getting hit would get injured but would not die. ThatÂ's more realistic according to me. The script is written straight down, some errors may exist.