Jump to content
Sign in to follow this  
Joe98

How to make 2 conditions true before a trigger fires.

Recommended Posts

At the moment I can fire on the enemy from 1,000 meters and the scenario ends before I have occupied the ground.

The trigger is set so that if Opforce is not present the trigger fires.

If all the Opforce is killed, or they run outside the trigger area then the trigger will fire and this works just fine.

However, I need another condition. The player needs to be inside the trigger area before it fires.

So in the Condition cell of the trigger I need to write "player is present". How do I write this?

===================================================================

I stumbled on the answer already:

player in thislist

Note the spacing above is correct.

.

Share this post


Link to post
Share on other sites

I don't know why, but "player in thisList" ain't working for me. There are a lot of times when I would need this kind of condition, but it just doesn't activate. Is there an problem with naming units or what?

activation = east not present;

Why write "east" instead of "Opfor"? I know Opfor doesn't mean anything in scripts, and that "east" is for Russia, etc., but you just select that kind of activation from the drop down menu anyway, right? And you select "Opfor", not "east". Is there something I'm missing?

Share this post


Link to post
Share on other sites

Yes as you describe it, this does not work. My work around at the time was as follows:

Place a Bluforce soldier on the map ( that’s you)

Place a box on the map and name it box1

Place trigger1 on the map with 100 meters radius. Activation Redforce, Not present

In the On Activation field type; deletevehicel box1;

Place an Opforce soldier in the middle of the trigger

Preview: Shoot the Opforce soldier and the trigger fires and the box disappears

Now place trigger 2 on the map with 30 meters radius. This is placed in the middle of the first trigger. Activation Blueforce present.

In the On Activation field type; (!alive box1) && (player in thislist)

Preview: Shoot the Opforce solder and note the box disapper. Now run into trigger 2 and trigger 2 will fire.

You can double check this. Send a subordinate soldier into that second trigger area and it will not fire because he is not "player".

Effectively: There are no Opforce soldiers in the trigger area of 100 meters around your objective and you have entered a smaller trigger area of 30 meters which was your actual objective.

Share this post


Link to post
Share on other sites

Or you could just use a variable instead of the box, if you're using the box only for trigger detection. E.g. you'd use something like trigger1activated=false where you create the box, trigger1activated=true where you destroy the box and trigger1activated && player in thisList for the second trigger's condition.

Share this post


Link to post
Share on other sites

Make two triggers.

Trigger 1:

Activation: Anybody present

Condition: vehicle player in thisList

onAct.: fieldTaken = true;

Trigger 2:

Activation: OpFor not present

Condition: this && fieldTaken

onAct.: whatever it is you want to happen....

Put the two triggers on top of each other.

Share this post


Link to post
Share on other sites

another work around is instead of using east not present do the opposite

Activation: West Present (T or F)

Condition: east countSide thisList == 0

onAct: what ever you want.

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  

×