What i am trying to do is to have a prim object changed is color by command,I am making a stone,and wanted to change different colors,like i would say
/5 Diamond red or /5 safari blue,how would i able to do that ?anyone if they can help me plz.
These forums are CLOSED. Please visit the new forums HERE
Hello I need help with a color changing script |
|
Booda Fox
Registered User
Join date: 22 Feb 2005
Posts: 10
|
03-27-2005 20:04
What i am trying to do is to have a prim object changed is color by command,I am making a stone,and wanted to change different colors,like i would say
/5 Diamond red or /5 safari blue,how would i able to do that ?anyone if they can help me plz. |
Jack Lambert
Registered User
Join date: 4 Jun 2004
Posts: 265
|
03-27-2005 20:45
Hrm,
This kind of thing is explained pretty clearly in the wiki here ... but... CODE
The commands are case sensitive in this example. I won't go into the details of listener events specifically but be sure to read about them. Most of us aren't fans of listener overkill. Incidentally, if you're planning to have it as part of an attachment, be sure to link it last. --Jack Lambert _____________________
----------------------------
Taunt you with a tree filled lot? hahahahahahaha. Griefer trees! Good lord you're a drama queen. Poor poor put upon you. -Chip Midnight |
Talena Wallaby
Registered User
Join date: 20 Mar 2005
Posts: 19
|
03-27-2005 20:53
What i am trying to do is to have a prim object changed is color by command,I am making a stone,and wanted to change different colors,like i would say /5 Diamond red or /5 safari blue,how would i able to do that ?anyone if they can help me plz. Commands you'll need: llListen(), listen(), llSetColor(). EDIT: And it took me so long to get around to actually typing that out that someone wrote something out all ready. Ah, well, at least I get points for trying. |
Talila Liu
Micro Builder
Join date: 29 Jan 2004
Posts: 132
|
03-27-2005 22:40
You Do realize that llSetcolor() can only take vectors with values from 0.0 to 1.0
fixed code. CODE
|
Booda Fox
Registered User
Join date: 22 Feb 2005
Posts: 10
|
thank you so much
03-27-2005 22:50
thank you again Talena Wallaby,Jack Lambert,Talila Liu , i appreciated
![]() |
Jack Lambert
Registered User
Join date: 4 Jun 2004
Posts: 265
|
03-28-2005 00:49
You Do realize that llSetcolor() can only take vectors with values from 0.0 to 1.0 For a vector or any other float, you may use the decimal value: 1 is 1.0 .1 is 0.10 Basically vector colours greater than 1.0 are still 1.0 but I think of colours in RGB ![]() I do this because I'm old skool. I still prefer VIM over Notepad, too ![]() --Jack Lambert _____________________
----------------------------
Taunt you with a tree filled lot? hahahahahahaha. Griefer trees! Good lord you're a drama queen. Poor poor put upon you. -Chip Midnight |
Booda Fox
Registered User
Join date: 22 Feb 2005
Posts: 10
|
Ok the scripts is awesome but having a bit problem.
03-28-2005 22:29
the script works great just what i was looking for,but when i give the item to someone else,the command doens't work?.what to do?..
|
Cid Jacobs
Theoretical Meteorologist
![]() Join date: 18 Jul 2004
Posts: 4,304
|
03-28-2005 22:37
llResetScript()
_____________________
|
Booda Fox
Registered User
Join date: 22 Feb 2005
Posts: 10
|
where would i put that in the script ?llResetScript()
03-28-2005 22:40
integer giChannel = 5; // Channel to listen on
default { state_entry() { llListen(giChannel, "", llGetOwner(), "" ![]() } listen(integer iChan, string sName, key kId, string sMes) { if (sMes == "safari blue" ![]() if (sMes == "diamon red" ![]() if (sMes == "emerald green" ![]() } } |
Cid Jacobs
Theoretical Meteorologist
![]() Join date: 18 Jul 2004
Posts: 4,304
|
03-28-2005 22:46
on_rez(integer start_param)
{ llResetScript(); } _____________________
|