OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Thomas G Vorm on 12 Nov 2007, 21:41:14
-
I'm making a mission where you have to take out enemy AAA in order to call in an airstrike on a base. The problem I'm having is that you really don't have to, the plane will drop it's bombs even while taking damage from AAA.
So, I need a trigger that detects whether or not the plane has any damage, and if it does then set that damage to 1. This way, as soon as the plane gets hit by AAA it goes down. Should be pretty easy, I just don't know what to put in the condition field. Something like - plane1 damage > 0 ?
Any help would be great
Python1
-
Trigger Conditon: ((getdammage plane1) > 0.05)
Trigger Activation: plane1 setdammage 1
You wasn't that far off ;)
If however, you don't want it to blow up straight away, but simply just go down, then maybe change the activation to: plane1 setfuel 0
This will bring it down as the engines will shut off, and if I remember correctly the AI will eject as long as it has time before it is actually shot down.
-
Great That's exactly what I needed thanks.
Python1
-
Just may also just eject the crew as soon as minimal damage is detected.
-
easiest solution:
plane addeventhandler ["hit", {this setdamage 1}];
in the init file.
-
All of these work great, now the player really will have to take out the AAA before calling support, thanks everyone.
Python1