logan83 11 Posted October 22, 2013 (edited) y try to do this and dont work... Soldier attachto [Table, [0,0,0]]; soldier setdir 180; the soldier is attached to the table... but i can rotate the soldier :| Ok forget... the soldier is named as local variable... sorry... Edited October 22, 2013 by Logan83 SOLVED!!! Share this post Link to post Share on other sites
lappihuan 178 Posted October 23, 2013 look at the examples of the BIKI for attachTo it explain that very well. best regards Lappihuan Share this post Link to post Share on other sites
Noddan 11 Posted November 7, 2013 Hello, I also have this issue, how did you solve it? I'm trying to attach a notepad (called "notepad") to a desk (called desk1) and rotate it 90 degrees. I feel like I've tried every solution suggested in them concerning "setDir" and "setVectorDirAndUp". For instnace (used in the notepad's init line): notepad attachto [desk1,[0,0,0.4]]; notepad setdir 90; notepad setpos getpos notepad; (this one leaves the notepad on the ground, rotation still unchanged, even if I change it to "setDir 110" for instance) And as the examples suggests on BIKI: notepad attachto [desk1,[0,0,0.4]]; notepad setVectorDirAndUp [[0.5,-0.5,0],[0.5,0.5,0]]; (nothing happens by adding the setVectorDirAndUp line, no matter the numbers) //Noddan Share this post Link to post Share on other sites
dmarkwick 261 Posted November 7, 2013 Have you tried setting the direction first then attaching? Share this post Link to post Share on other sites
2nd ranger 282 Posted November 7, 2013 (edited) attachTo is broken. You can setDir an object that is attached to a unit, and vice versa, but not an object attached to another object. Have you tried setting the direction first then attaching? An attached object's direction always reverts to 0, relative to the "front" of the thing it is attached to. Edited November 7, 2013 by 2nd Ranger Share this post Link to post Share on other sites
Noddan 11 Posted November 7, 2013 @DMarkwick: Yes, no difference @2nd Ranger: Thanks for the heads up! Share this post Link to post Share on other sites
Noddan 11 Posted November 7, 2013 Killzone Kid found a workaround in the feedback tracker, you have to execute the commands twice at the moment. notepad attachto [desk1,[0,0,0.4]]; notepad setdir 90; notepad attachto [desk1,[0,0,0.4]]; notepad setdir 90; and for "_i" from 1 to 2 do { notepad attachto [desk1,[0,0,0.4]]; notepad setVectorDirAndUp [[1,0,0],[0,0,1]]; }; both work! Check out issue ID: 0007228 //Noddan 1 Share this post Link to post Share on other sites
Tankbuster 1733 Posted July 20, 2014 Note that this doesn't fix the issue when on dedicated servers. Share this post Link to post Share on other sites
johnnyboy 3742 Posted May 14, 2017 Is using SetDir after Attaching to an object no longer working? Nevermind. Please ignore this post. Using setdir after attachTo works as it should. 1 Share this post Link to post Share on other sites