Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Reading llGetPos

Turokhan Legion
Vortech Enterprises CEO
Join date: 22 Jul 2007
Posts: 32
12-28-2008 07:20
Ahh, this ones driving me insane...

im making a teleport device.

one object has this simple script inside:

default
{
state_entry()
{
vector position = llGetPos();
llRegionSay(-444, (string)position);
}
}

The second object has a number if coding, but in short i want it to listen to the above.
So near the top we have this:

vector position = <0,0,0>;

default
{
state_entry()
{
llListen(-444,"","","";);
}
listen(integer x, string name, key id, string msg)
{
if (llGetOwnerKey(id) == llGetOwner())
llOwnerSay(msg); // this outputs the llGetPos from script 1
}
}

i then thought about changing
vector position = <0,0,0>;
to
vector position = msg;
but got syntax error.

Scratches head
I've tried llGetObjectName, llSetObjectName too. But SL throws a systax wobbly!!
_____________________
Ron Khondji
Entirely unlike.
Join date: 6 Jan 2007
Posts: 224
12-28-2008 07:35
Well you only need to declare vector position once, so if you put
position = (vector)msg;
in the listen instead of 'vector position = msg;' it should work just fine.
Turokhan Legion
Vortech Enterprises CEO
Join date: 22 Jul 2007
Posts: 32
12-28-2008 07:40
Awesum...that done it tyvm
_____________________