Issue Data
|
Issue #20173: Vanilla (Turret Spotlights ) & Automatron DLC (Wall-Mounted Spotlights) stop working after fast-
This bug report is for both vanilla and Automatron DLC. The issue with the Wall Mounted Spotlights in the Automatron DLC is similar to the vanilla turret spotlights issue.
__Automatron DLC - Wall Mounted Spotlights__ After you put them up in a settlement and fast-travel out of the settlement, they will stop casting light and stop rotating once you fast-travel back. The only way to restart them is to pick them up in the Workshop Crafting Mode and put them back. __Vanilla - Turret Spotlight__ In vanilla, the turret spotlight simply stops casting light, but it does keep rotating, after a fast-travel. There is a mod that fixes the Vanilla issue with turret spotlights not casting light @ http://www.nexusmods.com/fallout4/mods/11090/, but the author didn't manage to completely fix the Automatron DLC Wall-Mounted Spotlights. Thought it might be worth checking out. |
I can confirm this bug. Additionally, if you try to select and move the new Automatron wall-mounted lights, the game totally glitches out. If you try to move the light up, it goes down. If you try to move the light left, it goes right.
Sometimes it starts to twist inward, clipping with the object you're trying to attach it to.
This only happens after first placing the object, then picking it up and trying to place it again.
Sometimes it starts to twist inward, clipping with the object you're trying to attach it to.
This only happens after first placing the object, then picking it up and trying to place it again.
I have seen this on the vanilla side at least. Noticed that the one I hooked up at Sanctuary Hills will cycle back on if I turn the generator off that it's hooked up to and turn the generator back on right after.
Surprise, surprise ...
The workshop spotlights are NOT running the SpotlightScript, only WorkshopObjectScript and WorkshopObjectActorScript.
Turning on the light on load should be handled from the OnLoad event of one of those scripts, but they don't currently do anything in this respect.
The workshop spotlights are NOT running the SpotlightScript, only WorkshopObjectScript and WorkshopObjectActorScript.
Turning on the light on load should be handled from the OnLoad event of one of those scripts, but they don't currently do anything in this respect.
Arthmoor,
Could you please check whether the following modification to the OnLoad event of WorkshopObjectScript does the job:
<pre class="_prettyXprint _lang-">
event OnLoad()
; create link on load if I have an owner
if AssignedActorLinkKeyword
Actor myOwner = GetActorRefOwner()
if myOwner
myOwner.SetLinkedRef(self, AssignedActorLinkKeyword)
endif
;EDIT: Added branch to handle spotlights
else
Actor meActor = (self as ObjectReference) as Actor
if meActor && RequiresPower() && IsPowered()
meActor.SetUnconscious(true)
meActor.SetUnconscious(false)
endif
endif
EndEvent
</pre>
Problem is that the spotlights are actors and the lights are embedded weapons, and appearance changes as a result of power on/power off events are apparently handled at engine level, i.e. the light is automatically switched on/off when power is switched on/off (this is not handled by any script, but we know that it works when the generator is switched off, then on again). While I can't switch the power off by a script command, I can set the actor unconscious, i.e. make him appear unpowered, and when I'm right, setting him to conscious immediately afterwards should fix the problem.
Note that the script modification will do this to all turrets, because there is no way to check for spotlights specifically without adding a script property.
Could you please check whether the following modification to the OnLoad event of WorkshopObjectScript does the job:
<pre class="_prettyXprint _lang-">
event OnLoad()
; create link on load if I have an owner
if AssignedActorLinkKeyword
Actor myOwner = GetActorRefOwner()
if myOwner
myOwner.SetLinkedRef(self, AssignedActorLinkKeyword)
endif
;EDIT: Added branch to handle spotlights
else
Actor meActor = (self as ObjectReference) as Actor
if meActor && RequiresPower() && IsPowered()
meActor.SetUnconscious(true)
meActor.SetUnconscious(false)
endif
endif
EndEvent
</pre>
Problem is that the spotlights are actors and the lights are embedded weapons, and appearance changes as a result of power on/power off events are apparently handled at engine level, i.e. the light is automatically switched on/off when power is switched on/off (this is not handled by any script, but we know that it works when the generator is switched off, then on again). While I can't switch the power off by a script command, I can set the actor unconscious, i.e. make him appear unpowered, and when I'm right, setting him to conscious immediately afterwards should fix the problem.
Note that the script modification will do this to all turrets, because there is no way to check for spotlights specifically without adding a script property.
Tested it myself. Built a spoltlight at Sanctuary, then was off for some time to Thicket Excavations. When I returned, a reset started running on the Sanctuary workshop, indicating that Sanctuary had unloaded in the meantime (this is how resets are handled after fixing the reset issue). The light of the spotlight was turned on when I returned, so this appears to work.
Would be fine though if somebody else could confirm this.
Would be fine though if somebody else could confirm this.
I tried out the modified OnLoad block. It changed nothing. The spotlight I have built in Sanctuary does not light up when I return.
Is it possible it won't fix one that already existed?
Is it possible it won't fix one that already existed?
That's one of the reasons why I had my doubts. Anyway, I still have a couple of ideas to solve this.
One more thing you could try out while I'm trying another scripted approach: all those turrets have an AI package. Make a copy of that package for the spotlights and tick the 'weapon always drawn' flag. Maybe that will change something ...
One more thing you could try out while I'm trying another scripted approach: all those turrets have an AI package. Make a copy of that package for the spotlights and tick the 'weapon always drawn' flag. Maybe that will change something ...
Actually not only spotlights but also other turrets with small colored indicators are bugged: http://i.imgur.com/tqt6F1B.jpg Should be like this: http://i.imgur.com/U9JHxEr.jpg
How to fix: add to WorkshopObjectActorScript
<code>
Event OnCellLoad()
if !IsUnconscious()
SetUnconscious(true)
SetUnconscious(false)
endif
EndEvent
</code>
If you loading save with bugged turrets nearby leave this place and return (tested with coc command and walking on foot, please test fast-travel).
Modifying OnLoad doesn't work maybe because 3d model not loaded yet.
How to fix: add to WorkshopObjectActorScript
<code>
Event OnCellLoad()
if !IsUnconscious()
SetUnconscious(true)
SetUnconscious(false)
endif
EndEvent
</code>
If you loading save with bugged turrets nearby leave this place and return (tested with coc command and walking on foot, please test fast-travel).
Modifying OnLoad doesn't work maybe because 3d model not loaded yet.
Showing Comments 1 - 8 of 8