|
Pastrami Pestana
Sexual Inuendo
Join date: 12 Jul 2006
Posts: 31
|
12-11-2007 17:41
Hello! Well, one of my scripts isn't working, and I cant find the problem. Basic Use: Listen to a base prim, record positions, then play them back when commanded. So far, the recording is the problem. I put in llOwnerSay((string)*value*), and they keep coming back as zero vectors. Here's the script, please take a look! vector pone; vector ptwo; vector pthree; rotation rone; rotation rtwo; rotation rthree; default { link_message(integer sender,integer num,string msg,key id) { if(msg == "rone"  { pone = llGetLocalPos(); rone = llGetLocalRot(); } if(msg == "rtwo"  { ptwo = llGetLocalPos(); rtwo = llGetLocalRot(); } if(msg == "rthree"  { pthree = llGetLocalPos(); rthree = llGetLocalRot(); } if(msg == "one"  { llSetPos(pone); llSetRot(llGetRootRotation() * rone); } if(msg == "two"  { llSetPos(ptwo); llSetRot(llGetRootRotation() * rtwo); } if(msg == "three"  { llSetPos(pthree); llSetRot(llGetRootRotation() * rthree); } } } Thanks!
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
12-11-2007 20:16
You will have to tweak the math. I was just testing this in a single prim. But it does record each pos/rot and then sets to those when touched. Hopefully it will help you out. Here is the test rig I was using: integer next = 0; list phrases = ["rone", "rtwo", "rthree", "one", "two", "three"]; string test;
default { touch_start(integer total_number) { test = (llList2String(phrases, next)); llMessageLinked(-4,1,test,""); if(next == 5)next = 0; else next++; } }
vector pone; vector ptwo; vector pthree; rotation rone; rotation rtwo; rotation rthree;
default { link_message(integer sender,integer num,string msg,key id) { llOwnerSay(msg); if(msg == "rone") { pone = llGetLocalPos(); rone = llGetLocalRot(); } if(msg == "rtwo") { ptwo = llGetLocalPos(); rtwo = llGetLocalRot(); } if(msg == "rthree") { pthree = llGetLocalPos(); rthree = llGetLocalRot(); } if(msg == "one") { llSetPos(pone); llSetRot(rone); } if(msg == "two") { llSetPos(ptwo); llSetRot(rtwo); } if(msg == "three") { llSetPos(pthree); llSetRot(rthree); } } }
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|