OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: solitosnake on 11 Dec 2005, 19:16:34
-
im having problems with my realistic patrol mission. its supposed to be a surveillance mission. what do i write in triggers to make it activate when i, the player sees something? is there something which can make the objective activate when i right click on a target?
thanks in advance!
-
Using the 'detected by' option maybe?
-
Welcome to the forum!
I'm not sure how well this will work with a human unit rather than an AI loon, but yes you could just use a "detected by" trigger.
If you want to be more specific - that is, if the player has to detect a specific unit rather than just a side - then the knowsAbout command is probably the way to go.
Trigger:-
Condition: playerGrp knowsAbout loon1 > XXX
On activation: as you like
Syntax not guaranteed. I can't remember what XXX should be but there are some good writeups on knowsabout kicking around. Try the forum the tutorials and the FAQ in the Editors Depot. I know its a chore using all the different search functions ....
-
wow. bloody thank you. the navy seals have to detect an enemy unit. an officer, making an arms deal. i post here if it works or if not. thanks for the quick replies!
-
If you want to check if the player knows about one or more units in a particular group try putting this in the trigger's condition field:
{player knowsabout _x > 0.105} count units groupname > 0
Where groupname is the name of the group you want to check that the player knows about. If you want to check on more that one group try:
{player knowsabout _x > 0.105} count (units groupname1 + units groupname2 ...) > 0
Not tested and I am now in that nice Sunday pre-dinner state of relaxed inebriation so who knows!
-
more specific: its on tonal, and i know there are the same units on both east and resistance side. so if i make east and resistance friendly to each other, they wont shoot at each other. and if hes the onlt res. soldier in the mission, it will only activate when i right click on him. because the map is filled with east patrols. do you think that will work? or is it too unreliable?
-
Sounds like it should work. Certainly worth a try.
-
yes it works. good and thanks for the help!