OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: KoniaX on 09 Aug 2004, 02:09:34

Title: Detecting Part II
Post by: KoniaX on 09 Aug 2004, 02:09:34
Hey everyone. What I want to do now involves detecting some empty trucks. I want the player (East) to look through his binoculars, see some empty NATO ammo trucks, and end the mission. But I was told a while back that you can't detect empty trucks (or anything empty for that matter...). So how would I go about doing this?
Title: Re:Detecting Part II
Post by: Dubieman on 09 Aug 2004, 03:11:58
Maybe group the trucks to the detected trigger....

Otherwise I dunno... :P
Title: Re:Detecting Part II
Post by: macguba on 09 Aug 2004, 10:28:17
The usual way to fake this is just to use a "player present" trigger.    However, its often not very well done.

I would suggest a number of different player present triggers, covering different directions.    You could combine them with getDir commands so that you have checked that the player has been in the right area and looked in the right direction.    In this case the triggers would look a bit like the petals of a flower.

Perhaps also show the trucks in the Outro.   Or even go to a cutscene when the player gets close to them.
Title: Re:Detecting Part II
Post by: h- on 09 Aug 2004, 16:34:47
Eh...

Yes you can detect empty vehicles... Easily...

a)
Empty vehicles are set to side Civilian. OFP engine does this. So if using triggers to detect empty vehicles the trigger should be set to be activated by civilian...

b)
When detecting something with the binolars, the command knowsAbout comes in extremely handy...

You name the NATO trucks, like truck_1,truck_2, etc. etc....
Then, make a trigger:
size 0/0
activation: none
condition: player knowsAbout truck_1 > 2 || player knowsAbout truck_2 > 2 || player knowsAbout truck_x > 2 etc... (repeat this to all the trucks...)
On activation: what ever you need to make the mission end...

Now, this trigger 'fires' when the player's knowsAbout value goes over 2... You may need to test around with that value, maybe less will be better...
Title: Re:Detecting Part II
Post by: olseric on 13 Aug 2004, 11:05:08
Read up in the editors depot about the knows about command.  Someone has added some good information regarding the values into the official commands reference.