OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Olle Stolpe on 27 Feb 2005, 01:58:22

Title: Set the KnowsAbout to 0
Post by: Olle Stolpe on 27 Feb 2005, 01:58:22
I want to set a Units KnowsAbout another Unit to 0.

Like:

badguy SetKnowsAbout goodguy = 0

Is there a way?
Title: Re:Set the KnowsAbout to 0
Post by: rhysduk on 27 Feb 2005, 02:13:35
Straight from the command reference:

unit knowsAbout target

Operand types:
    unit: Object or Group
    target: Object
Type of returned value:
    Number
Description:
    Check if (and how much) knows unit about target. If unit is vehicle, vehicle commander is considered.

Example:
    soldierOne knowsAbout jeepOne


Rhys
Title: Re:Set the KnowsAbout to 0
Post by: Olle Stolpe on 27 Feb 2005, 02:16:10
Yes... but this only tells me how to use the KnowsAbout command.
The command  tells me what a unit knows about another unit.

But..

I want to set the KnowsAbout to a specific value.. In this case 0.
Title: Re:Set the KnowsAbout to 0
Post by: macguba on 27 Feb 2005, 02:46:09
Can't be done.    

The very idea .... it's a logical absurdity.  ::)  (Although it might be convenient sometimes in cutscenes.  ;D)

What are you trying to do?
Title: Re:Set the KnowsAbout to 0
Post by: Olle Stolpe on 27 Feb 2005, 11:53:29
Maybe I won't have to.. But, when a Unit is dead.
Is the KnowAbouts about that Unit set to 0 then?
Title: Re:Set the KnowsAbout to 0
Post by: Planck on 27 Feb 2005, 12:45:20
I think the knowsabout value decreases over time till it gets to 0.........provided the player isn't spotted again in the meantime.

I don't think killing the unit that detected the player will change the current knowsabout value very much, if at all.


Planck
Title: Re:Set the KnowsAbout to 0
Post by: Olle Stolpe on 27 Feb 2005, 13:03:12
No it doesn't, but I meant.

If guy1 knowsabout guy2 and guy2 is killed is the knowsabout set to 0 then?
Title: Re:Set the KnowsAbout to 0
Post by: Planck on 27 Feb 2005, 13:16:29
Quote
If guy1 knowsabout guy2 and guy2 is killed is the knowsabout set to 0 then?

It's a moot point, I don't see what difference it would make to anything. If guy2 is killed then the knowsabout value is irrelevant as far as guy2 is concerned.


Planck
Title: Re:Set the KnowsAbout to 0
Post by: Olle Stolpe on 27 Feb 2005, 14:12:29
Never mind then!

It does matter if guy1 KnowAbaouts guy2 > 0 starts a trigger and if guy2 is respawned in
10 seconds..

So anyway.. Doeas anyone know if the KNowAbout value is set to 0 when the detected Unit
is killed?
Title: Re:Set the KnowsAbout to 0
Post by: bedges on 27 Feb 2005, 14:24:44
you don't seem to be getting the answer you want, so might i suggest trying out a wee experiment for yourself. create an empty mission, place a few loons, and using the format command, together with hints, investigate what sets the knowsabout value, if at all.

my tuppenceworth. good luck :)
Title: Re:Set the KnowsAbout to 0
Post by: Planck on 27 Feb 2005, 15:04:28
OK, I did a little experiment and it seems even after guy2 is dead it takes knowsabout a few minutes to return to 0.

In other words it doesn't return to 0 immediately.

But, you might get different results.



Planck
Title: Re:Set the KnowsAbout to 0
Post by: Olle Stolpe on 27 Feb 2005, 16:02:27
Thanks.. I'll experiment a bit...