Jump to content
Sign in to follow this  
Chris1986

IED & Trigger Help

Recommended Posts

Hey just wondering if anyone has any clue on how to get this working ? Basicly i want to make a IED countermeasure so that if a player is carrying a certain weapon and walks into the IED trigger the trigger will not activate and prevent the IED from going off .

So far i have this , the IED works fine when BLUFOR enter the trigger but when im carrying the Countermeasure weapon it still goes off. Pretty sure it wont be that hard to do and im just being a berk and missing off something simple.

IED Object named ( obj1 )

Triggers :-

( FOR THE IED )

BLUFOR - Present
Name - IED1
Cond - This
OnAct - ied1 = "R_57mm_HE" createvehicle getpos obj1

( FOR THE COUNTERMEASURE )

Cond - player hasWeapon " CHOICE WEAPON "
OnAct - IED1 = false ;

--------------------------------------------------------

Any help would be mega!

Share this post


Link to post
Share on other sites
Hey just wondering if anyone has any clue on how to get this working ? Basicly i want to make a IED countermeasure so that if a player is carrying a certain weapon and walks into the IED trigger the trigger will not activate and prevent the IED from going off .

So far i have this , the IED works fine when BLUFOR enter the trigger but when im carrying the Countermeasure weapon it still goes off. Pretty sure it wont be that hard to do and im just being a berk and missing off something simple.

IED Object named ( obj1 )

Triggers :-

( FOR THE IED )

BLUFOR - Present
Name - IED1
Cond - This
OnAct - ied1 = "R_57mm_HE" createvehicle getpos obj1

( FOR THE COUNTERMEASURE )

Cond - player hasWeapon " CHOICE WEAPON "
OnAct - IED1 = false ;

--------------------------------------------------------

Any help would be mega!

i would combine all that into one trigger so to say

Triggers :-

( FOR THE IED )

BLUFOR - Present
Name - IED1
Cond - [color="Red"](!(player hasWeapon " CHOICE WEAPON ")) && (player in thislist)[/color] [color="SeaGreen"]&& (IED_Armed)[/color]
OnAct - ied1 = "R_57mm_HE" createvehicle getpos obj1

...

! = not - meaning if you don't have the weapon then that condition will become true and it should go off.

i would be real dirty too and set it to repeated activation so if you still left the zone and dropped the weapon it'll still go off in your face. :)

i would also create an IDE variable to go either true or flase on either disarm or detonation so it won't go off if its been disarmed/detonated already which i marked in green

now the armed variable would take a bit more scripting and i can give ya more input if needed :)

i'll be using something similar in my missions that i'll be working on after i'm done with my artillery project however i'll be going a different route so to say i'll define if detonation should occur depending on the number of units in the kill zone :)

Edited by soccerboy

Share this post


Link to post
Share on other sites

i get a error when i add ( !player hasWeapon " CHOICE WEAPON " && IED_Armed

) into the Cond : !: Type Object, expected bool ????

Cheer's for the help

Share this post


Link to post
Share on other sites
i get a error when i add ( !player hasWeapon " CHOICE WEAPON " && IED_Armed

) into the Cond : !: Type Object, expected bool ????

Cheer's for the help

lol sorry i screwed up. check the updated post above yours.

also the IED_Armed value won't work unless you define it as a true or false value so leave the green part out for now and try the red set of code

Share this post


Link to post
Share on other sites

yeah , it is kind of working . When i have the " CHOICE WEAPON " the IED does not go off , but if i dont or drop it the IED goes off weather i am inside the trigger or not.

Share this post


Link to post
Share on other sites
yeah , it is kind of working . When i have the " CHOICE WEAPON " the IED does not go off , but if i dont or drop it the IED goes off weather i am inside the trigger or not.

try the updated. if that doesn't work then i think i'll have to dig deeper lol :)

i think i would go and write a script though go into a much more detailed effects like:

trigger:

BLUFOR - Present
Name - IED1
Cond - this
OnAct - [thislist] execvm "script.sqf"

script.sqf:

_units_array = _this select 0;
_result = false;

for [{_u = 0},{_u < (count _units_array)},{_u = _u + 1}] do
{
    _unit = _units_array select _u;
    if (_unit hasweapon "WEAPON CHOICE") exitwith {_result = true};
};

if not (_result) then
{
    _ied = "R_57mm_HE" createvehicle getpos obj1
};

however i'm not 100% sure if my trigger+script method is going to work yet unless i try it out.

Edited by soccerboy

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×