GetDetectionLevel

Post » Tue May 17, 2011 11:00 am

I have not got this function to work as described in the wiki. Basically it always returns 0.00 when called on any actor with the player as the target. I have read some old posts. Some of these indicate that the function may be broken, while others have said that GetDetectionLevel will return something valid. I am lost. What I am trying to do is determine when the player gets into the various detection levels as displayed on the HUD while in sneak mode. You know - Hidden, Caution, Danger, Flashing danger. Is there any way to detect when these events are occurring? Like I said, using GetDetectionLevel always returns 0.00.
User avatar
Killah Bee
 
Posts: 3484
Joined: Sat Oct 06, 2007 12:23 pm

Post » Tue May 17, 2011 4:01 am

I'm not 100% sure, but I seem to remember someone saying that http://geck.gamesas.com/index.php/GetDetectionLevel only works in combat? I know that it can be used from the console, where it returns two numbers, http://geck.gamesas.com/index.php/Category:Detection and light level, regardless of combat or no combat, but that does not help you much. In my security overhaul, I ended up using http://geck.gamesas.com/index.php/GetDetected, even though it does not return the nuances of the HUD.

It is possible, however, that you could make a hack to get most of the results from the HUD: Danger is when the PC is detected by someone that wants to attack the PC (http://geck.gamesas.com/index.php/GetDetected+http://geck.gamesas.com/index.php/IsInCombat+http://geck.gamesas.com/index.php/GetCombatTarget==PC) and Hidden when the PC is undetected. The Caution setting is somewhat more difficult. http://geck.gamesas.com/index.php/GetAlarmed could be useful?
User avatar
CHANONE
 
Posts: 3377
Joined: Fri Mar 30, 2007 10:04 am

Post » Tue May 17, 2011 6:38 am

I can confirm the same behavior with GetDetectionLevel - seems to return nothing when the player is the target.
Went into combat with my follower with a bunch of raiders at melee distance. Hit the console key, selected a Raider. GetCombatTarget would return the player (14) or my follower. For any raider that had the player as a target, GetDetectionLevel 14 would return 0. For any raider that had my follower as a target, GetDetectionLevel RefID would return 3.
User avatar
Lovingly
 
Posts: 3414
Joined: Fri Sep 15, 2006 6:36 am

Post » Tue May 17, 2011 2:10 pm

Yup RickerHK, that's the exact same thing I got. I did not get the detection value nor the light level at any point in scripts or in the console using the player as either the ref or the target. This doesn't look like its possible.
User avatar
amhain
 
Posts: 3506
Joined: Sun Jan 07, 2007 12:31 pm

Post » Tue May 17, 2011 1:36 pm

I know that it can be used from the console, where it returns two numbers, http://geck.gamesas.com/index.php/Category:Detection and light level, regardless of combat or no combat, but that does not help you much.

I did not get the detection value nor the light level at any point in scripts or in the console using the player as either the ref or the target. This doesn't look like its possible.

I wrote that from memory. Unfortunately, as some of you have noted, it is wrong. It is http://geck.gamesas.com/index.php/GetDetected that returns the detection value and light level when used in the console. An interesting point is that a call of player.GetDetectionLevel someRef does return a value in the console, depending on if the player is facing someRef or not.
User avatar
Britta Gronkowski
 
Posts: 3475
Joined: Mon Apr 09, 2007 3:14 pm


Return to Fallout 3