Home   Help Search Login Register  

Author Topic: Detonating IED only when land vehicles are preset?  (Read 2521 times)

0 Members and 1 Guest are viewing this topic.

Offline ricnunes

  • Members
  • *
Detonating IED only when land vehicles are preset?
« 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.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Detonating IED only when land vehicles are preset?
« Reply #1 on: 27 Jun 2008, 14:51:00 »
#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):
Code: (trigger #1 activation) [Select]
(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.
Code: (trigger #3 activation) [Select]
(({ ((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...):
Code: (trigger (AP) activation) [Select]
(alive IED1) AND isServer AND (({ (((getPos _x) select 2) < 0.1) AND (_x isKindOf "Man") } count thisList) > 0)

Code: (trigger (AT) activation) [Select]
(alive IED1) AND isServer AND (({ (((getPos _x) select 2) < 0.1) AND (_x isKindOf "LandVehicle") } count thisList) > 0)
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline ricnunes

  • Members
  • *
Re: Detonating IED only when land vehicles are preset?
« Reply #2 on: 27 Jun 2008, 19:41:41 »
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.  :)

Offline fallujahmedic

  • Members
  • *
Re: Detonating IED only when land vehicles are preset?
« Reply #3 on: 28 Jan 2009, 22:30:01 »
 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.