OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: ricnunes on 27 Jun 2008, 13:28:51
-
For a mission (multiplayer) that I'm developing, I placed several IEDs which are working very well with the exception of a small problem in which the IED will not only detonate when soldiers and vehicles are present (which is exactly what I want) but also detonates if an aircraft flies over the IED. So basically I'm asking here for help in order to modify my IED triggers so that the IEDs will detonate only when a ground vehicle is present (either soldiers or land vehicles) and not when an aircraft flies over an IED.
Here are the triggers (total of 3) that simulates one remote detonated IED which works together with the IED Script v1.2 by Jeevz:
trigger #1 (the trigger that detonates the IED when opposing forces are present) :
Axis a: 25 Axis b: 25
Activation: BLUEFOR / Present
Condition: this AND (alive IED1) && isServer
On Act: [IED1, "huge"] exec "ied.sqs"
trigger #2 (the trigger that detonates the IED when the IED is destroyed) :
Axis a: 0 Axis b: 0
Activation: NONE
Condition: !(alive IED1)
On Act: [IED1, "huge"] exec "ied.sqs"; deleteVehicle IED1
trigger #3 (the trigger that "deactivates" the IED once NO Troops that could detonate the IED are present - ) :
Axis a: 200 Axis b: 200
Activation: OPFOR / Not Present
Condition: this
On Act: deleteVehicle IED1
Thanks in advance for replies.
-
#1 - Check that at least one of the men/vehicles in the zone are on the ground (Don't strictly need to use this in this case, since you are counting people in thisList to trigger it):
(alive IED1) AND isServer AND (({ ((getPos _x) select 2) < 0.1 } count thisList) > 0)
#2 - Not actually affected by aircraft ;P
#3 - Check when nothing in the trigger is on the ground any more.
(({ ((getPos _x) select 2) < 0.1 } count thisList) == 0)
Just in case you need it, since this is usually the next question (not sure men and vehicles can fly except in an explosion, but...):
(alive IED1) AND isServer AND (({ (((getPos _x) select 2) < 0.1) AND (_x isKindOf "Man") } count thisList) > 0)
(alive IED1) AND isServer AND (({ (((getPos _x) select 2) < 0.1) AND (_x isKindOf "LandVehicle") } count thisList) > 0)
-
Once again, thanks very, very much Spooner!
Those tips really helped to solve my problem and without your help I probably wouldn't have done it. :)
-
Are you having problems with the size of the explosions in your IED's? We're basically getting a 120mm HE round explosion. Unfortunately thats not doing much damage.