I wrote a simple script to restrain a settler from releasing himself(!) when a combat starts.
[Usage]
This mod does not touch the original pillory but adds another: "Pillory (Restrain)".
[Requirements]
Contraptions Workshop DLC
[Contents]
one .esp and one .ba2 (including one .pex and one .psc)
[Installation]
Put them in Data folder or use NMM.
[Uninstallation]
1. Delete all the modded pillory.
2. Delete the .esp and .ba2 or use NMM.
If you skip step 1., you might have settlers whose A.I. does not work
(settlers for whom the function SetRestrained(False) is not called).
[Script]
Scriptname PilloryScript extends WorkshopObjectScript
Actor User
Event OnActivate(ObjectReference akActionRef)
User = (akActionRef as Actor)
If (User != Game.GetPlayer())
User.SetRestrained()
EndIf
EndEvent
Event OnExitFurniture(ObjectReference akActionRef)
If (User != Game.GetPlayer())
User.SetRestrained(False)
EndIf
EndEvent
[Usage]
This mod does not touch the original pillory but adds another: "Pillory (Restrain)".
[Requirements]
Contraptions Workshop DLC
[Contents]
one .esp and one .ba2 (including one .pex and one .psc)
[Installation]
Put them in Data folder or use NMM.
[Uninstallation]
1. Delete all the modded pillory.
2. Delete the .esp and .ba2 or use NMM.
If you skip step 1., you might have settlers whose A.I. does not work
(settlers for whom the function SetRestrained(False) is not called).
[Script]
Scriptname PilloryScript extends WorkshopObjectScript
Actor User
Event OnActivate(ObjectReference akActionRef)
User = (akActionRef as Actor)
If (User != Game.GetPlayer())
User.SetRestrained()
EndIf
EndEvent
Event OnExitFurniture(ObjectReference akActionRef)
If (User != Game.GetPlayer())
User.SetRestrained(False)
EndIf
EndEvent