tek753 Posted February 11, 2012 Share Posted February 11, 2012 Although not stated on the Creation Kit page, (but stated here http://geck.bethsoft.com/index.php/MoveTo)The MoveTo and SetPosition functions do not move furniture unless you spawn it first using PlaceAtMe. For myself, this is not good. I need to move around a particular object from various scripts.I've tried parent/child script inheritance, as well as a variety of wacky approaches, but still have had no luck. Does anyone know of a way I can spawn a piece of furniture in Script A, and move it in Script B? This is the last part of what's become a great and useful mod, so I would love some help so I can share it! Thank you! Link to comment Share on other sites More sharing options...
tek753 Posted February 11, 2012 Author Share Posted February 11, 2012 Figured this out, amazingly enough. You didn't need script inheritance, just instantiate a variable of the parent script and invoke it's method.The only caveat is that you need to assign the actual object as well (I failed to do this and that's why it didn't work) What i mean is this: Let's say your parent script is "A" and another script is "B".These scripts have nothing to do with each other, and both inherit from ObjectReference (so no parent/child relationship here) Now, if I declare a variable of type A within B's script, I cannot invoke A's functions unless I now go to the properties of the object B is associated with (wow did that make sense? re-read that a few times) and once I am there, I point the property of this to an object that has "A" attached to it. If you need a more in-depth explanation send me a message i'll see it on e-mail and would be happy to talk further about it. It's actually quite basic but was plaguing me b/c I failed to do that last step! Although not stated on the Creation Kit page, (but stated here http://geck.bethsoft.com/index.php/MoveTo)The MoveTo and SetPosition functions do not move furniture unless you spawn it first using PlaceAtMe. For myself, this is not good. I need to move around a particular object from various scripts.I've tried parent/child script inheritance, as well as a variety of wacky approaches, but still have had no luck. Does anyone know of a way I can spawn a piece of furniture in Script A, and move it in Script B? This is the last part of what's become a great and useful mod, so I would love some help so I can share it! Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts