OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Ace Productions on 04 May 2004, 09:11:48

Title: KnowsAbout command
Post by: Ace Productions on 04 May 2004, 09:11:48
When using the KnowsAbout command you state the level at which the guard will react, ie:

_guard KnowsAbout _intruder > 0 where 0 is the level of awareness of the guard.

Is there any way via a script to obtain this level when the guard is alerted?

Title: Re:KnowsAbout command
Post by: h- on 04 May 2004, 10:12:00
I'm not completely sure what you mean, but:

_knowl = _guard knowsAbout _intruder

Title: Re:KnowsAbout command
Post by: Ace Productions on 04 May 2004, 14:28:16
I'll try to be more exact. The number at the end of the command:

ie _guard KnowsAbout _specops>0

defines the level of awareness of the guard, that is, at which point the guard will react.

If in  the editor I put one EAST soldier to guard and one WEST soldier to attack, is there anyway via a script or something, to know at which point the EAST soldier reacted i.e. at 2.22226?

Title: Re:KnowsAbout command
Post by: DrStrangelove on 04 May 2004, 17:21:32
?(( _guard  knowsAbout  _intruder)  > 2.22226): < reaction >

This means, the <reaction> code will run when the guard 'knows enough' of the intruder to 'satisfy' the knowsabout level 2.22226.


To obtain the level the guard has when getting alerted, will work like this:

- set behaviour of the guard to AWARE (this setbehaviour "AWARE")
- now loop a script or make a trigger that reacts to ?(behaviour _guard == "COMBAT"). Then see what the knowsabout command tells you ( _level = _guard knowsabout _intruder ).
Title: Re:KnowsAbout command
Post by: General Barron on 04 May 2004, 19:59:21
Check the commented commands ref in the ed depot, under the 'knowsabout' command. There are some comments that may be of help. Toadlife claims the value you're looking for is like 0.015, but I think it is higher than that; perhaps 1.5
Title: Re:KnowsAbout command
Post by: Ace Productions on 06 May 2004, 07:06:52
Thanks to all of you guys for your replies. I solve my problem by using:

_level=_guard KnowsAbout _intruder
Hint Format ["Level: %1",_level]

That way I can examine the different levels of knowsabout i.e. whwn the guard sees you or when he just hears a shot etc.