Rezubi Posted February 19, 2013 Share Posted February 19, 2013 hey guys, So I am having issues trying to compile a script that moves an NPC to a specified location: JFJohnFargo.setpos X 34876.1680 Y 67101.8281 Z 3724.5027 However, I get the error that "JFJohnFargo" is an invalid reference and that only object references are reference variables are allowed, how do I find the ref id for my npc? thanks for any help, Link to comment Share on other sites More sharing options...
Xaranth Posted February 19, 2013 Share Posted February 19, 2013 Double click on his reference in the render window; if you didn't actually name it, you'll need to set one. Standard convention is to call it JFJohnFargoREF Link to comment Share on other sites More sharing options...
Rezubi Posted February 19, 2013 Author Share Posted February 19, 2013 (edited) Ok, I named the reference so now it's: JFJohnFargoREF.setpos X 34876.1680 Y 67101.8281 Z 3724.5027 but, now I am getting an error that JFJohnFargoREF is a none persistent reference. Edit: Never mind I fixed that by ticking "Persistent Reference" thanks for the help. Edited February 19, 2013 by Rezubi Link to comment Share on other sites More sharing options...
Rezubi Posted February 19, 2013 Author Share Posted February 19, 2013 hmm now I seem to be getting the error: "expected end of line." Link to comment Share on other sites More sharing options...
rickerhk Posted February 20, 2013 Share Posted February 20, 2013 setpos can only do one axis at a time, so you need JFJohnFargoREF.setpos X something JFJohnFargoREF.setpos Y something JFJohnFargoREF.setpos Z something Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted February 21, 2013 Share Posted February 21, 2013 If you don't know why something isn't working the way you think it should, look it up. Link to comment Share on other sites More sharing options...
Recommended Posts