|
Mallaien Messmer
Registered User
Join date: 14 Feb 2007
Posts: 1
|
04-18-2007 17:28
I have 2 objects, Object A report its pos to object B with this: vector objectlocation = llGetPos(); llSay(0, "" +(string)objectlocation); Object B get the info with this: llListen(0, "", "", ""  ; listen(integer channel, string name, key id, string message) { llSay(0, "I See Object A at: " +(string)message); } Object A gets its pos, converts the vector into a string in the llSay, I need to convert the string from the listen back to a vector for a llMoveToTarget() command.
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
04-19-2007 00:28
From: Mallaien Messmer I have 2 objects, Object A report its pos to object B with this: vector objectlocation = llGetPos(); llSay(0, "" +(string)objectlocation); Object B get the info with this: llListen(0, "", "", ""  ; listen(integer channel, string name, key id, string message) { llSay(0, "I See Object A at: " +(string)message); } Object A gets its pos, converts the vector into a string in the llSay, I need to convert the string from the listen back to a vector for a llMoveToTarget() command. Casting message to a string in your listen is pointless as it is already a string, but that is is the correct approach. Try casting the string back to a vector listen(integer channel, string name, key id, string message) { vector v = (vector)message; llSay(0, "I See Object A at: " +(string)v + " (" + message + ")"); }
|