|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
09-07-2006 12:09
Been tring it different ways but still can't get it to read the description into the vector field. It does compile but it doesn't do anything. Any suggestions?:
llRezAtRoot(llGetInventoryName(INVENTORY_OBJECT, 0), (vector)llGetObjectDesc(), ZERO_VECTOR, ZERO_ROTATION, 42);
|
|
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
|
09-07-2006 12:22
Well, the simplest answer to this is that llGetObjectDesc is going to return a string. You cannot directly convert a single string to a vector since it requires 3 separate variables.
The resolution? You will need to parse the string to a list first.
|
|
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
|
09-07-2006 12:39
From: Jesse Barnett Been tring it different ways but still can't get it to read the description into the vector field. It does compile but it doesn't do anything. Any suggestions?:
llRezAtRoot(llGetInventoryName(INVENTORY_OBJECT, 0), (vector)llGetObjectDesc(), ZERO_VECTOR, ZERO_ROTATION, 42); It could be that the vector you're entering into the description is not in region coordinates, you may be asking it to rez at <0,0,1>, which means in the very south west corner of the sim at a height of 1 meter. If the rezzing object is not within 10m of there it'll fail silently. Tiarnalalon is incorrect, I use vector positions in object descriptions all the time, (vector)llGetObjectDesc() works fine.
_____________________
-Seifert Surface 2G!tGLf 2nLt9cG
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
09-07-2006 13:09
I use "llSetObjectDesc( (string)llGetRootPosition() );"which will set the description like this: <40.57762, 246.15448, 63.68597>
So it has to be somewhere in the way I worded it. It works just fine if I copy the description and paste it into the vector field like this:
llRezAtRoot(llGetInventoryName(INVENTORY_OBJECT, 0), <40.57762, 246.15448, 63.68597>, ZERO_VECTOR, ZERO_ROTATION, 42);
|
|
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
|
09-07-2006 13:29
I dunno what you're doing wrong, this works fine for me: default { state_entry() { llSetObjectDesc( (string)llGetRootPosition() ); }
touch_start(integer total_number) { llRezAtRoot(llGetInventoryName(INVENTORY_OBJECT, 0), (vector)llGetObjectDesc(), ZERO_VECTOR, ZERO_ROTATION, 42); } }
_____________________
-Seifert Surface 2G!tGLf 2nLt9cG
|
|
Kayla Stonecutter
Scripting Oncalupen
Join date: 9 Sep 2005
Posts: 224
|
09-07-2006 13:33
Try this just for debugging purposes, to see what's happening: string item = llGetInventoryName(INVENTORY_OBJECT, 0); string strvec = llGetObjectDesc(); vector pos = (vector)strvec; llSay(0, "Rezzing: " + item + " at " + strvec + ", aka " + (string)pos); llRezAtRoot(item, pos, ZERO_VECTOR, ZERO_ROTATION, 42);
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
09-07-2006 13:54
Hey this is wild!!!!!:
errrr nevermind I caught myself there. I need to read the inevntories object description field. Reading objects description reads the prim the script is sitting in.
|