Zzyxzz Posted March 31, 2017 Share Posted March 31, 2017 How do i add something to the work with a script? Does someone can give a small example for that? Like placing a 10mm weapon onto the road after the sanctuary bridge or on a desk / under the desk Link to comment Share on other sites More sharing options...
vkz89q Posted March 31, 2017 Share Posted March 31, 2017 (edited) How do i add something to the work with a script? Does someone can give a small example for that? Like placing a 10mm weapon onto the road after the sanctuary bridge or on a desk / under the deskIt's pretty simple really. The problem is placement. Sometimes it seriously sucks, like in this bridge case. But, it can be worked by using MoveTo and playing with x,y,z after placing the object. Event OnInit() ObjectReference WeaponRef = SanctuaryBridge.PlaceAtme(WeaponToPlace, abForcePersist=true) ; places the gun pretty much middle of the bridge, can drop to water if bad luck WeaponRef.MoveTo(SanctuaryBridge, 10, 5, 2) ; move it here, if needed; need a lot of testing ingame to see proper placement WeaponRef.AttachMod(receiver) ; you can add mods to it too if you want EndEvent ObjectReference Property SanctuaryBridge Auto Const ; pick a sanctuary bridge in render window Weapon Property WeaponToPlace Auto Const ObjectMod Property Receiver Auto Const EDIT: Be careful, I don't know how this affects cell resets etc, like is it gonna affect raider respawning at bridge? No idea, might want to test that ingame with lot of sleeping. What I do for my custom npc, is make her custom interior cell that is not connected to anything, place her there in ck, and then use moveto to move her in to the world. I have not run to any problems this way. Edited March 31, 2017 by vkz89q Link to comment Share on other sites More sharing options...
Recommended Posts