Jump to content

Photo
- - - - -

Binding "detected by" to a specific detecting unit, please help


  • Please log in to reply
3 replies to this topic
Thread Starter
Brumisator
Brumisator

    Rookie

  • Members
  • 6 posts

Posted 26 February 2010 - 18:39 #1

Hello,

I know I'm a newbie here, but please heed my call.
I have researched this on the forums, in other tutorials but I can't find anything helpful.

I have a unit (let's call it "heli"), tied to a trigger, and that trigger fires when it is "detected by BLUFOR".
Now, tying this trigger to the unit ("heli") makes the trigger fire only "when "heli" is detected.

But how do I make it so only a specific unit can be accepted as the one to detect this?
In simple terms, how do I make if 'heli' spotted by 'player' then ....

ceeeb
ceeeb

    Staff Sergeant

  • Members
  • 392 posts

Posted 26 February 2010 - 21:34 #2

In the condition, try:
player knowsAbout heli > 1

Adjust the number to suit your requirements.

All units in a group share the same knowledge of the world (ie, all have the same knowsAbout value for any object)

Edit:
For reference, a detected by trigger is the same as checking for knowsAbout > 0.
In OFP, there were various knowsAbout values at which the AI can tell which side the target was on, what type of unit it is etc. But from memory these values were different for different types of unit/vehicle. It was quite clever though, for example the AI hard a hard time correctly identifying the side of a vehicle crewed by enemy if the type of vehicle was normally friendly to them (eg a west soldier in a stolen T72).

Assuming the target is an enemy, another universal check you could use is the findNearestEnemy command, to see if the player has identified the target as a enemy.

Edited by ceeeb, 27 February 2010 - 21:19.


galzohar
galzohar

    First Lieutenant

  • Members
  • 5575 posts

Posted 26 February 2010 - 22:14 #3

The problem with this is that the actual meaning of the knowsAbout value is vague, and worse - it differs based on which addons you're using.
You don't mess with the Zohar!
YouTube channel: http://www.youtube.com/user/galzohar
Steam: http://steamcommunity.com/id/galzohar
ArmA Israel: http://www.arma-il.info
Check out and support upcoming Ground Branch: http://www.groundbranch.com/

Thread Starter
Brumisator
Brumisator

    Rookie

  • Members
  • 6 posts

Posted 27 February 2010 - 13:10 #4

Well thanks, this seems to help.

At least now I'm going into the right direction.