Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

String to Vector ?

WaL Krugman
Registered User
Join date: 25 Apr 2006
Posts: 38
03-25-2009 10:01
well it may be a noob question but I appreciate any help . SO here what i have, Prim A and Prim B. Prim A will have a script that will detect the color (llGetColor) of the prim then say it via a channel. Prim B will listen to Prim A using same channel and use llSetColor to color prim B the same color Prim A has.
The problem I am having is how to translate the (string) coming from Prim A (i.e. Prim A say: <1,1,0>;) in to a (vector) that can be used by prim B to use it in the llSetColor command.

Thanks again for any help...
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
03-25-2009 10:04
vector color = (vector)messageString;

http://www.lslwiki.net/lslwiki/wakka.php?wakka=Typecast
WaL Krugman
Registered User
Join date: 25 Apr 2006
Posts: 38
03-25-2009 10:27
Thank you very much
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-25-2009 11:29
caveat: if you ever store a vector as type string in a list, make sure to retrieve it with llList2String, and NOT llList2Vector as the second one will return ZERO_VECTOR (because it doesn't do implicit typecasting)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -