Jump to content
Sign in to follow this  
sic-disaster

Checking units not present in a certain area

Recommended Posts

Hello guys,

I'm making a coop campaign but i'm getting stuck on one of the missions.

The basic scenario is a failed attack on a small island, where a helicopter crashed and just two players survived.

All the other players are responsible for getting the crash survivors off the island alive.

I have looked and looked, but i havent found a script yet that fully supports my needs, i need the objective to be completed when survivor1 and survivor 2 are not present on the island.

survivor1 AND survivor2 in thislist

Does not seem to work.

Right now i have a trigger that checks the life of survivor1 and 2, which fails the mission when both of them die.

I have created a trigger around the small island which would complete the mission when no Blufor is present.

However, these two triggers have a big, big chance of not working together, probably signing off an objective when all the players are dead, while also failing the mission because two of those players were survivor1 and 2.

So what would be the best way of handling this?

EDIT: i have also tried making the two survivors Independant units, however this requires me to duplicate a lot of triggers for both factions, making the mission rather intensive.

Obviously i'd like to avoid this situation.

Share this post


Link to post
Share on other sites

Wouldn't it be better to make the mission end with a win when the two survivors are actually back on base? If the mission ends when they have barely left the island, doesn't the mission end very abruptly?

I dunno, to me it just seems more logical if they have to be flown back to base.

Share this post


Link to post
Share on other sites

Try

survivor1 in thislist AND survivor2 in thislist

Edited by F2k Sel

Share this post


Link to post
Share on other sites

I got the same problem Sic-disaster back in the time; and Professor Tournesol found the right code :

(survivor1 in thislist) && (survivor2 in thislist);

Share this post


Link to post
Share on other sites

Alright thanks, i'll try it out :)

EDIT: both dont seem to work unfortunately :(

Edited by SiC-Disaster

Share this post


Link to post
Share on other sites

Either method works fine, make sure your trigger is set to anyone present or the side you want to detect is present, maybe set to repeating as well.

You should also make sure that the code you execute in the script to move the men is actually working.

Share this post


Link to post
Share on other sites
Alright thanks, i'll try it out :)

EDIT: both dont seem to work unfortunately :(

It works as said F2ksel I tried it myself in the editor :

1st) units side BLUEFOR

2nd) The trigger is outside "the island" in your case, so I put survivor1 and survivor2 on map without any trigger covering them, the trigger area is considered outside of island, survivor1 and survivor2 are independent units (even in the same group it works), I have put them a way-point so they reach the outside area (covered by the trigger); I put one nearer the "outside area" and the other one farer so they don't arrive at the same time "under" the trigger; it only works if both are present as requested.

3rd) Setting up the trigger :

Trigger activation: Anybody

- Repeatedly

- Present

- Type none

- Condition: (survivor1 in thislist) && (survivor2 in thislist);

And simulated the task success by a plain txt in effects part of the trigger.

https://docs.google.com/leaf?id=0B0VuG9_95m2jMjBlYzk4YzAtYWIxYi00ZDY3LWFiMTItYmNlZDQ3NTY0ZmE2&hl=en

Edited by Katrician
Added mission example

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  

×