OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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?
-
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
-
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.
-
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?
-
Maybe I won't have to.. But, when a Unit is dead.
Is the KnowAbouts about that Unit set to 0 then?
-
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
-
No it doesn't, but I meant.
If guy1 knowsabout guy2 and guy2 is killed is the knowsabout set to 0 then?
-
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
-
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?
-
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 :)
-
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
-
Thanks.. I'll experiment a bit...