SAC Posted July 30, 2018 Posted July 30, 2018 Hi, I am trying to use this function: https://www.creationkit.com/fallout4/index.php?title=AttachWire_-_ObjectReference I don't know how to declare and populate the property in order to pass a different spline to the script akSpline: Must be a BendableSpline object. If None is passed, it will use the default workshop wire (FormID 0001D971) <= I want to use a different form thanks!
SAC Posted July 30, 2018 Author Posted July 30, 2018 So far I am trying to use this syntax, it compiles but nothing shows up in-game. Any clues? ObjectReference InvisibleMatRef1 = furniturestage3ref.placeatme(Game.GetForm(0x000000C2), 1) InvisibleMatRef1.setposition(InvisibleMatRef1.getpositionx(), InvisibleMatRef1.getpositiony(), InvisibleMatRef1.getpositionz()+50) InvisibleMatRef1.addkeyword(workshopkwd) ObjectReference InvisibleMatRef2 = furniturestage3ref.placeatme(Game.GetForm(0x000000C2), 1) InvisibleMatRef2.setposition(InvisibleMatRef2.getpositionx(), InvisibleMatRef2.getpositiony(), InvisibleMatRef2.getpositionz()+150) InvisibleMatRef2.addkeyword(workshopkwd) ObjectReference wireRef = InvisibleMatRef1.CreateWire(InvisibleMatRef2, Game.GetForm(0x00021F34))
SAC Posted August 1, 2018 Author Posted August 1, 2018 Figured it out, with the help of F4SE team and kinggath (thank you!) For future reference: - the endpoint objects .nifs need to have connector points (check out the generator nif for reference, just copy the connector point branch to your nif) - the endpoint objects need to be linked with a workshop reference - I have used the Sanctuary workshop bench reference For example, this code spawns two objects (which have been added connector points in their nif) and spawns a rope between them ObjectReference SplineStartRef = caster.placeatme(furniturestage3, 1) SplineStartRef.addkeyword(workshopkwd) SplineStartRef.SetLinkedRef(workshopref, workshopkwd) ObjectReference SplineEndRef = caster.placeatme(furniturestage3, 1) SplineEndRef.setposition(SplineEndRef.getpositionx(), SplineEndRef.getpositiony(), SplineEndRef.getpositionz()+100) SplineEndRef.addkeyword(workshopkwd) SplineEndRef.SetLinkedRef(workshopref, workshopkwd) utility.wait(1) ObjectReference wireRef = SplineStartRef.createwire(SplineEndRef, Game.GetForm(0x00021F34)) Problem is that the rope is static, it does not adjust if I move the endpoints after spawning. So, kinda fail, overall
Recommended Posts
Archived
This topic is now archived and is closed to further replies.