Jump to content
Sign in to follow this  
aeggwards1

Trigger Question regarding conditions

Recommended Posts

Hi,

I am creating a mission which involves 5 ieds which have a probability of 6% - 50% of appearing in the mission. I also have 3 enemy insurgents which are set to captive to blend with civilian population.

I want to give weapons and set captive false for these insurgents once an ied has been either disarmed or exploded. I have created a trigger to rearm the insurgents but my condition field breaks when an ied is not present in the mission. Am I missing something?

getDammage ied1 > 0.5 || getDammage ied2 > 0.5 || getDammage ied3 > 0.5 || getDammage ied4 > 0.5 || getDammage ied5 > 0.5

Thanks in advance,

Aeggwards1

Share this post


Link to post
Share on other sites

Well, you can't refer to an object that doesnt even exists. ;)

What does your ied blowing trigger/script look like?

Share this post


Link to post
Share on other sites

Sorry: I missed the fact that the ied's had random condition of presence. What kind of object are you using?

Share this post


Link to post
Share on other sites

Thanks shk, I thought that would be the case, I guess I will have to create a trigger for each unless I can think of a way to check creation and damage in a condition field.

IED script is just TCP's from Armaholic forums. Hmm, wonder if I could modify that to add weapons to insurgents once the ied blows?

Using IED objects by Emery

Share this post


Link to post
Share on other sites

Well, wherever the actual detonating/blowing of an IED is done, add something like this there:

iedDetonated = true; publicvariable "iedDetonated"

Then you can use a trigger with condition:

!isnil "iedDetonated"

to equipt the units.

Share this post


Link to post
Share on other sites

Another method (that I have used several times).

Place an insurgent carrying a satchel charge (pipebomb) on the map and give him a waypoint where you want him to place the bomb.

On activation: unitname fire ["pipebomb"]

The unit will place a bomb on the ground. It can be seen and disarmed by a player in the game. Now give your bomber another waypoint, away from the bombing site (unless he's on a suicide mission). When you want him to fire the bomb, you give him the following command:

unitname action["TouchOff",unitname]

This can be done with a trigger (detected, present or measuring distance), another waypoint (Sentry for example) or a script of your own.

Share this post


Link to post
Share on other sites

@shk: Thanks mate, that worked perfectly, now my insurgents are being armed if I disarm or explode a bomb.

@nominesine: Thanks but I didn't want to use pipebombs in this mission. I will keep that in mind though because I have always wondered how to get AI to plant and explode them.

Cheers

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  

×