Welcome to the AFK Mods bug tracker. In order to report an issue, you need to have a VALIDATED account to post one. Once you have followed the link the registration email sent you, please select a project from the drop down menu below. Select “Open New Issue” and fill out the form with as many details as possible.

Please also consider sending your bug report to Bethesda if you are reporting on an issue with Skyrim Special Edition, Fallout 4, or Starfield. Doing so will help everyone on all platforms.

Issue Data
Status: Closed
Issue Type: Bug Report
Project: Unofficial Fallout 4 Patch
Component: Fallout 4: Vanilla
Category: Papyrus
Assigned To: Sclerocephalus
Platform: Windows PC
Severity: Low
Votes: 0
Watching: N/A
Opened By Sclerocephalus on Jun 5, 2016 10:24 pm
Last Edited By BlackPete on Mar 3, 2018 3:17 am
Closed By Arthmoor on Jan 28, 2018 12:15 am
Resolution: Fixed
Comment: Fixed for UFO4P 2.0.3.

Issue #20595: AbLegendaryScript errors

 
[06/05/2016 - 11:26:22AM] error: Cannot GetValuePercentage with None ActorValue
stack:
[ (001C4719)].Actor.GetValuePercentage() - "<native>" Line ?
[Active effect 2 on (001C4719)].AbLegendaryScript.OnHit() - "<unknown file>" Line ?
[06/05/2016 - 11:26:25AM] error: Cannot GetValuePercentage with None ActorValue
stack:
[ (001C4719)].Actor.GetValuePercentage() - "<native>" Line ?
[Active effect 2 on (001C4719)].AbLegendaryScript.OnHit() - "<unknown file>" Line ?
[06/05/2016 - 11:26:36AM] error: Cannot GetValuePercentage with None ActorValue
stack:
[ (001C4719)].Actor.GetValuePercentage() - "<native>" Line ?
[Active effect 2 on (001C4719)].AbLegendaryScript.OnHit() - "<unknown file>" Line ?
[06/05/2016 - 11:26:38AM] error: Cannot GetValuePercentage with None ActorValue
stack:
[ (001C4719)].Actor.GetValuePercentage() - "<native>" Line ?
[None].AbLegendaryScript.OnHit() - "<unknown file>" Line ?
[06/05/2016 - 11:26:38AM] error: Cannot register unbound script to receive hit events
stack:
[None].AbLegendaryScript.RegisterForHitEvent() - "<native>" Line ?
[None].AbLegendaryScript.OnHit() - "<unknown file>" Line ?

001C4719 is a leveled raider. During the game, it was a legendary raider (eventually, a grenade blew him from the roof). Thus, the effect applies to a matching target, and there is actually nothing wrong with the script. Nonetheless, it lost the actor's reference eventually. I have no clue how this can happen.

Anyway, a sanity check in the OnHit() event wil prevent any side effects of such mysteries from occurring again:

Event OnHit(ObjectReference akTarget, ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked, string apMaterial)



;EDIT: Added snity check to bail out if akTarget = none for whatever reason:

If akTarget == None

Return

EndIf



if akTarget.GetValuePercentage(Health) < HealthThreshhold && PoweredUp == false

LegendaryPowerUp.cast(akTarget, akTarget)

if (akTarget as Actor).GetCombatTarget() == Game.GetPlayer()

LegendaryPowerUpMsg.Show()

PowerUpSound.Play(akTarget)

endif

PoweredUp = true

else

RegisterForHitEvent(akTarget)

endif



EndEvent

Related Issues: 23980  

Comments

1 comment(s) [Closed]
Sclerocephalus said:
 
Re-opened this ticket, since checking for akTarget == none did not fix it.

However, checking for IsBoundGameObjectAvailable() does !

Showing Comments 1 - 1 of 1