Home   Help Search Login Register  

Author Topic: knowsAbout results  (Read 720 times)

0 Members and 1 Guest are viewing this topic.

Kammak

  • Guest
knowsAbout results
« on: 22 Mar 2004, 04:25:29 »
I thought the return value of this function was always in the range 0 to 1?  I'm getting results of 1.34 and such during a mission.  I'm calling it on a group as opposed to an individual, so is the return value a SUM of everyone's knowsAbout value in the group?

If so, is it always best to run this against every individual instead of on a group?

Kammak

  • Guest
Re:knowsAbout results
« Reply #1 on: 22 Mar 2004, 05:10:15 »
Oops.  Okay I see the range is 0-4.  Anybody know about the q regarding groups though?

It seems that it is a sum when called on a group - I would assume and prefer it returned the max from within the group....

Offline TonyRanger

  • Members
  • *
  • I'm a llama!
Re:knowsAbout results
« Reply #2 on: 22 Mar 2004, 14:34:32 »
what's the difference between 0 to 4.

Jo Jo Joni

  • Guest
Re:knowsAbout results
« Reply #3 on: 22 Mar 2004, 14:51:39 »
"It seems that it is a sum when called on a group - I would assume and prefer it returned the max from within the group..."

You need a bit of scripting, something like the following:

_num = count units groupname
_i = 0

#start
_sol = units groupname select _i
_howmach1 = _sol knowsabout guy
?(_i == 0): _howmachmax = _howmach1
?(_howmach1 > _howmachmax): _howmachmax = _howmach1
_i = _i + 1
?(_i < _num):goto "start"

_howmachmax is a local variable that determines how much the most knowing guy of the checked group knows about the guy.

Correct me if I'm wrong  8)
« Last Edit: 22 Mar 2004, 14:59:54 by Jo Jo Joni »

Jo Jo Joni

  • Guest
Re:knowsAbout results
« Reply #4 on: 22 Mar 2004, 14:56:54 »
Of course, if you want to use the variable _howmachmax somewhere out of the script simply add at the end of the little script

howmachmax = _howmachmax

and howmachmax will be the resulting variable, able to use in other scripts or triggers.  :)

Kammak

  • Guest
Re:knowsAbout results
« Reply #5 on: 22 Mar 2004, 19:31:19 »
Thanks but I've got the script written...still wondering about the results from a group through?  It is a sum or a max?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:knowsAbout results
« Reply #6 on: 22 Mar 2004, 20:40:52 »
AFAIK the groups knowsAbout is the same as an invidual unist knowsAbout in that group.
If unit7 knowsAbout the NME, the unit reveals it (sideradio "Enemy Soldier 6 o'clock" or sumtin) to the rest of the group thus making the groups knowsAbout the same...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Kammak

  • Guest
Re:knowsAbout results
« Reply #7 on: 22 Mar 2004, 21:31:21 »
Great, thanks!

Kammak

  • Guest
Re:knowsAbout results
« Reply #8 on: 22 Mar 2004, 21:45:04 »
TonyRanger -

0 means the unit doesn't know anything about the other unit
4 means they know the exact position of the unit


From messing around with this, it seems that ANY death or explosion raises the level to 1.4 or 1.5 automatically, even if they haven't seen you.

I.e. - If I sneak in and plant a satchel charge next to a tank then sneak back out and detonate it while completely out of sight - anyone near the explosion has their knowsAbout level (against me) go instantly to 1.5 - even though no one has actually seen me at all.

This also fires the Trigger "Detected", even though no one has really detected you...they are just aware that someone must be around because something blew up.

Same happens if you snipe at someone with a surpressed rifle - anyone around the guy that was killed goes to 1.5, but they don't actually have a clue where you are.

To make a realistic detection script I'm guessing the threshold needs to be around 2...in my case I make all the guards doMove to my last spotted pos when anyone has a knowsAbout higher than 1.7.

I use a "Detected" trigger to kick off the script, and the script then polls every 40 seconds finding the highest knowsAbout level (of every bad guy on the map).  Once it reaches 1.8 all hell breaks loose and they all head out to the last spotted pos.

After that it polls every 4 minutes, in case they loose contact with me and then subsequently re-spot me (or anyone in my team).

I'm surprised it is this complicated to script though - some more events would be extremely helpful - like an event for Behaviour changes, or an "Engaged" event indicating an individual is now under fire and/or firing at hostiles.  Would make mission scripting a lot simpler!


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:knowsAbout results
« Reply #9 on: 23 Mar 2004, 01:14:07 »
toadlife wrote something about this - it's in the Ed Depot somewhere .... I think it's in the online command ref but not sure.
Plenty of reviewed ArmA missions for you to play