ImojenSander Posted July 18, 2016 Share Posted July 18, 2016 ok hoping someone can help, i just want to rez a simple object by pressing a buttin with the below script in itNow the object is called hand and its in my objects folder with permissions copy no mod no trans, but keep getting this when button is pressed Could not find object 'hand'. What am i doing wrong.thanks// Rez an object on touch, with relative position, rotation, and velocity all described in the rezzing prim's coordinate system. string object = "hand"; // Name of object in inventory vector relativePosOffset = <2.0, 0.0, 1.0>; // "Forward" and a little "above" this prim vector relativeVel = <1.0, 0.0, 0.0>; // Traveling in this prim's "forward" direction at 1m/s rotation relativeRot = <0.707107, 0.0, 0.0, 0.707107>; // Rotated 90 degrees on the x-axis compared to this prim integer startParam = 10; default { touch_start(integer a) { vector myPos = llGetPos(); rotation myRot = llGetRot(); vector rezPos = myPos+relativePosOffset*myRot; vector rezVel = relativeVel*myRot; rotation rezRot = relativeRot*myRot; llRezObject(object, rezPos, rezVel, rezRot, startParam); } } Link to comment Share on other sites More sharing options...
Rolig Loon Posted July 18, 2016 Share Posted July 18, 2016 It's hard to say. Check to be sure that "hand" is in the same prim in the object that your script is in, not in another child prim "hand" isn't misspelled as "Hand" or "hand " Link to comment Share on other sites More sharing options...
ImojenSander Posted July 18, 2016 Author Share Posted July 18, 2016 thanks for the reply yes everything is spelt right its in the right prim and its in the object folder Link to comment Share on other sites More sharing options...
Vulpinus Posted July 18, 2016 Share Posted July 18, 2016 ImojenSander wrote: Now the object is called hand and its in my objects folder with permissions copy no mod no trans, Do you mean that you are expecting to rez the "hand" while it is in your inventory objects folder? If so, that's not how it works. You cannot rez items directly from your inventory with a script. You have to put a copy of the item you want to rez into the item that is running the script along with the script itself. Drag it from your inventory and drop it into the button item's contents where the script is. Link to comment Share on other sites More sharing options...
Rolig Loon Posted July 18, 2016 Share Posted July 18, 2016 Exactly. :smileywink: That's why I said "... is in the same prim in the object that your script is in". I assume that the OP knows that a rezzer has to contain whatever it is supposed to rez, although I agree that it's a little worrisome that he says that "hand" is in its "Object" folder. Prims don't have Object folders. If spelling is correct (including not having any errant blank spaces) and if the "hand" is actually where it is supposed to be, that script should work. Link to comment Share on other sites More sharing options...
ImojenSander Posted July 18, 2016 Author Share Posted July 18, 2016 yes thats it knew i wasnt doin somethin right, newbie mistake thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now