Home   Help Search Login Register  

Author Topic: Soldier detect soldier  (Read 1244 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Soldier detect soldier
« on: 15 Mar 2009, 19:33:16 »
Hi how do you get a soldier to detect another solider. Like a trigger of east detects west..

How do I get a specific soldier to detect another specific soldier?

Thanks..
Who's hyped for Arma4, long live Arma!

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Soldier detect soldier
« Reply #1 on: 15 Mar 2009, 21:17:47 »
You could use the knowsAbout command, which is 1 when the unit knows nothing about the target, and greater than that (up to 4), depending on the level of knowledge.  You could just do a simple condition on a trigger:
Code: [Select]
(_unitA knowsAbout _unitB)>1
And then do whatever you want onAct.
« Last Edit: 15 Mar 2009, 21:19:42 by JamesF1 »

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: Soldier detect soldier
« Reply #2 on: 16 Mar 2009, 02:46:35 »
But won't that just make the soldier known to the other soldier?

What I want is for when the east soldier sees the west soldier , I mean actually sees him and detects him, then he runs to the town and activates the alarm.

I don't think the knowsabout command will do that?
Who's hyped for Arma4, long live Arma!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Soldier detect soldier
« Reply #3 on: 16 Mar 2009, 08:18:41 »
Quote
But won't that just make the soldier known to the other soldier?
No, it checks if A's knowsAbout of B is more than 1, which is exactly what you're looking for..

Note that the knowsabout value of 1 is reached when the enemy is quite close (about 50 or so meters with default skill AI). When the knowsAbout value is about 0.1 the soldier will start to fire at the target..
« Last Edit: 16 Mar 2009, 08:26:13 by h- »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.