Difference between revisions of "MLPV2 Texture Changer Add-on"
Line 2: | Line 2: | ||
Simple add on tool for MLPV2 that puts a button on the MLPV2 menu that, when clicked, gives a user a choice of textures for prims in the object with the MLPV2 scripts. | Simple add on tool for MLPV2 that puts a button on the MLPV2 menu that, when clicked, gives a user a choice of textures for prims in the object with the MLPV2 scripts. | ||
(This script won't work for props, only for the prim where the | (This script won't work for props, only for the prim where the MLPV2 scripts are, and the prims linked to it) | ||
By Teq Hutchinson, November 2009. | By Teq Hutchinson, November 2009. | ||
Revision as of 08:58, 30 November 2009
Simple add on tool for MLPV2 that puts a button on the MLPV2 menu that, when clicked, gives a user a choice of textures for prims in the object with the MLPV2 scripts. (This script won't work for props, only for the prim where the MLPV2 scripts are, and the prims linked to it)
By Teq Hutchinson, November 2009.
Steps to use:
- Copy and paste the Main_Script on this page into a script called as you want;
- Drop this first script into the prim where you have the rest of the MLPV2 scripts;
- Copy and paste the Slave_Script on this page into a script called as you want;
- Drop this second script into the child prims you want to texture with it;
- Add the textures you wish to use into each concerned prims (including root prim if you want);
- Add to the menu in an MLPV2 menu notecard the following line(s):
LINKMSG Choice1 | 0,-4,987777,Texture1 LINKMSG Choice2 | 0,-4,987777,Texture2 ...
In the above line, there are two elements for you to customize as appropriate:
- Choice1 : the wording that you want to appear for the button on the blue menu.
- Texture1 :the name (case and spacing sensitive) of the texture you need to use.
<lsl> // Texture Changer MAIN_SCRIPT //add-on by Teq Hutchinson for MLPV2 by Lear Cale. November 2009.
default { link_message(integer sender_num, integer num, string str, key id) {
if (num ==987777 )
{ llMessageLinked( LINK_ALL_OTHERS, 987777, str, "" ); if (llGetInventoryType(str)==0) llSetTexture(str, ALL_SIDES);
//THIS WILL APPLY YOUR TEXTURE TO ALL THE SIDES OF THE PRIM //SEE https://wiki.secondlife.com/wiki/LlSetTexture IF YOU NEED SOMETHING DIFFERENT
} } } </lsl>
<lsl>
// Texture Changer SLAVE_SCRIPT
//add-on by Teq Hutchinson for MLPV2 by Lear Cale. November 2009.
default
{
link_message(integer sender_num, integer num, string str, key id)
{
if (num ==987777 && llGetInventoryType(str)==0 ) llSetTexture(str, ALL_SIDES);
//THIS WILL APPLY YOUR TEXTURE TO ALL THE SIDES OF THE PRIM //SEE https://wiki.secondlife.com/wiki/LlSetTexture IF YOU NEED SOMETHING DIFFERENT } }
</lsl>