Creator support function.
This script adds the function of changing the color of a button such as a HUD that would have a lot of function. The function performs the change from the name of a prim constituting the object and not by its link number.
Indeed, to change the color of an element of an object, we use the LSL function:
llSetLinkColor ( integer link number, vector color, integer face );
However, if we add a prim to an object, the link numbers change, ( integer link number,…
In this case, we have to change the link numbers in our script with each addition. This is a painful waste of time.
This script allows you to change the color, transparency, etc. From the name of the prim:
SetPrimColor (string PRIM, vector COLOR);
As well as all kinds of derived functions that you can imagine based on the same principle:
SetPrimLight (string PRIM);
SetPrimAlpha (string PRIM, float ALPHA);
SetPrimXX (string PRIM, float WhatYouWant);
Thanks to this function, you can add as many prims as you want, the link number is updated automatically.
CAREFUL! Remember to give a different name to each prim so that each one is recognized individually.
I designed this script during the creation of version 2 of the HUD IRIS CAM Follower which contains about forty buttons.
This script made my life easier when adding buttons, I assure you.
The script is commented on to help you understand how it works.
An example panel of 25 cubes and an activation button is provided. This panel is not transferable but the script is in full permission.
For any other explanations, you can contact me directly.
//---------------------------------------------------------------------------------------
TERMS OF USE.
Purchasing a product under full permissions does not entitle you to distribute it for free.
Realize that this represents work for the creator who is doing you a favor by allowing you to use it for your own creations.
You can use this product for your creations. Resale is permitted by changing the rights :
- Copy, Non-modifiable and Non-transferable,
- Non-copyable, non-modifiable, transferable.
Please respect these rules
Friendly
Arlequin Carter
- full permission Script
- Managing the colors of an object
- HUD color management
- Multi-prim color management
- Script for creator