OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Trash Can Man on 30 Jun 2006, 19:08:16

Title: Trigger question
Post by: Trash Can Man on 30 Jun 2006, 19:08:16
I'm making a "downed pilot" mission and I'd like to know how do I set a trigger showing whether the rescued pilots have made it back to base? The way I have it setup now is that there team (USA) can set off the trigger to end the game. I don't want this to happen. At the moment I'm using a hostage script to monitor whether they are alive or dead.

Trash Can Man($)
Title: Re: Trigger question
Post by: bedges on 30 Jun 2006, 21:12:17
click the groups button. draw a line from the trigger to the unit. the trigger will now only be activated by that unit.
Title: Re: Trigger question
Post by: zaitoh on 30 Jun 2006, 21:12:56
I'm also new to scripting but if you add something like this to the 'radio-triggers' conditions-field:

this and (pilot distance dude) < 50

Here, pilot is the name of your pilot, dude is the name of an object in the bases and 50 is how close to that object the pilot has to be. Then the trigger would only turned true if both distance check and the radio is sent.

Now I go back and work with my own script. Wont get any sleep tonight ;)

/ZaiToh
Title: Re: Trigger question
Post by: Trash Can Man on 01 Jul 2006, 00:17:31
click the groups button. draw a line from the trigger to the unit. the trigger will now only be activated by that unit.

That might work for one, I have another mission where 9 pow's have to be rescued. What do I do in this case?
Title: Re: Trigger question
Post by: bedges on 01 Jul 2006, 10:53:27
if the 9 POWs are all in one group, draw the line from the group leader to the trigger as before, but in the 'activated by' box, select 'all group members'.

if they're separate POWs... group them ;)
Title: Re: Trigger question
Post by: Chris Death on 01 Jul 2006, 11:51:04
I guess they are not in same group for the reason that they are not located in same spot - to make
the mission less boring.

Now all you need is to give each an individual name in the name field (like: pow1 pow2 etc.)

Now the trigger's activation by the side your pows are on and then in the condition field:

this AND pow1 in thislist AND pow2 in thislist AND etc.

~S~ CD
Title: Re: Trigger question
Post by: Trash Can Man on 01 Jul 2006, 19:04:37
I guess they are not in same group for the reason that they are not located in same spot - to make
the mission less boring.

Now all you need is to give each an individual name in the name field (like: pow1 pow2 etc.)

Now the trigger's activation by the side your pows are on and then in the condition field:

this AND pow1 in thislist AND pow2 in thislist AND etc.

~S~ CD


Yuo are correct, they are 9 individuals locted in 3 seperate camps. I'll give your idea a try. Thanks for the quick responses guys. Much appreciated.  :)
Title: Re: Trigger question
Post by: Tyger on 02 Jul 2006, 00:40:42
You might want to put paraenthases in that though. I've had troubles with some triggers going off soley because there were no parenthases placed.

Try:
Code: [Select]
this && (pow1 in thislist) && (pow2 in thislist) && (pow3 in thislist)