Jump to content
Sign in to follow this  
frosties

IED problem

Recommended Posts

As seen in the official tutorial video:

The idea of random places are good, but since the trigger area is so big, if the IED is further away, it will go of without a vehicle is even close to it when you enter the trigger area.

Is there any way to have it in random location, and have a trigger following it?

For example:

Have 3 random locations, and each location have a trigger circle grouped to it?

And when the vehicles enter the trigger where the bomb is, it will go off?

Share this post


Link to post
Share on other sites

You could make the trigger smaller, or name the trigger than attach the trigger to the IED via:

nameOfTrigger attachTo[iedObject, [0,0,0]];

Share this post


Link to post
Share on other sites

yes i have a smaller trigger, but if you put in 3-4 different markers for some random placements, the trigger will be wrongly place most of the times.

If i named the IED object "IED" and the trigger "triggerIED"

would this be correct:

triggerIED attachTo[iED], [0,0,0]];

And would this be put into the triggers fields or what?

Share this post


Link to post
Share on other sites

triggerIED attachTo[color="Red"][[/color]IED, [color="DarkOrange"][[/color]0,0,0[color="DarkOrange"]][/color][color="Red"]][/color];

Put this in the init field of the IED.

Share this post


Link to post
Share on other sites

The object that ive placed as an IED is "garbage"

Named: IED

i´ve put

triggerIED attachTo[iED, [0,0,0]];

in the garbage INIT field.

i have a small trigger thats located at the first IED site.

Named: triggerIED

When i test the mission, the IED is randomized, it switches places, but each time its triggered by the first trigger. The trigger doesnt move with the garbage.. so to speak, its only attached to the first position where i put the garbage, not any of the markers...

Share this post


Link to post
Share on other sites

View this demo to see it working. The trigger starts in in front of the player with the garbage between the left road cones.

When the player walks between the flags nothing should happen, because the trigger has been moved to wherever the garbage is. Walk between the cones at the garbage's location (especially the right side) and you'll get the message you're in the trigger zone.

Share this post


Link to post
Share on other sites

works perfect thank you!

when the trigger gets attached, is the "flag" on the trigger get centeretd on the thing its attached to?

Share this post


Link to post
Share on other sites

Well, the only time you'd attach a trigger would be if the trigger had a radius and you wanted to check the radius around the object. So yes, the center of the trigger would be the object.

If it's a trigger that's just looking for something to be true, it can be anywhere and any size. Most people make them 0x0 area just to keep things clean.

Share this post


Link to post
Share on other sites

awesome! :)

Now if i would like to have several IED, and to have them go off only when their trigger is triggered..

can i add some kind of array into:

_explosion = _shell createVehicle position IED;

Like:

_explosion = _shell createVehicle position IED, IED2, IED3;

Or do i have to have one SQF file for each IED?

Share this post


Link to post
Share on other sites

If you wanted multiples of that you'd probably just create everything (IED and trigger) on the fly and not worry about attachTo. Just put markers where you want them to possibly be, pick a marker and spawn IED/trigger there. Repeat as needed.

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  

×