a lost user
Join date: ?
Posts: ?
|
09-07-2005 04:33
While trying to decipher a script from a free item last night, there was a reference made in a comment that one of the textures called was contained in the "emitter inventory".
How can this "inventory" be accessed to see what else it contains? It was certainly not in my inventory. The script worked just fine when it was placed into other objects, so it is clearly calling the texture from someplace. Can anyone elaborate on this? Thanks.
Lovepeace
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
09-07-2005 04:43
You can generally use textures in scripts through two methods: 1) put a copy of the texture inside the prim, along the script (in the prim's own inventory) 2) get the UUID of the texture frpù your inventory and put that in the script instead of its filename. You can access a prim's inventory by expanding the Edit window (click "Advanced"  and selecting the "Contents" tab.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
a lost user
Join date: ?
Posts: ?
|
09-07-2005 16:04
From: Jesrad Seraph You can generally use textures in scripts through two methods: 1) put a copy of the texture inside the prim, along the script (in the prim's own inventory) If the texture is removed from the contents of the prim, the script will fail and also whatever is currently using the texture will revert to the default texture. Basically, when you reference a texture from the contents, that's what you are doing.. directly using the texture in the contents. Once that texture is missing from that location, the world decides it is missing and reverts to default textures. For this reason, I would recommend always using the second method mentioned: From: someone 2) get the UUID of the texture frpù your inventory and put that in the script instead of its filename. The UUID can be obtained by right-clicking on any texture, which you have full permissions of, and selecting the option "Copy Asset UUID". This copies the texture key to the clipboard, in the same way that you can copy and paste text, and from there you can paste it directly into your script. For example: string blank = "5748decc-f629-461c-9a36-a35a221fe21f";
default { state_entry() { llSetTexture(blank,ALL_SIDES); } }
|
a lost user
Join date: ?
Posts: ?
|
09-08-2005 07:41
The script had neither of these methods. It did something like this(am at work now so can't log in to find it exactly):
llSetTexture("blobbies.tga", ALL_SIDES); // From the emitter inventory
and the blobbies.tga(or tgf?) text had changed to a green color, not the red text shown for the UUID, as though the compiler was recognizing this as some specific function call.
Lovepeace
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
09-08-2005 08:34
"blobbies.tga" is the name of the texture file in the object's inventory then.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
a lost user
Join date: ?
Posts: ?
|
09-08-2005 10:27
From: Jesrad Seraph "blobbies.tga" is the name of the texture file in the object's inventory then. When the script was copied into a new object that did not contain that texture, the new object did the same thing, calling forth little galaxies that were slowly gobbled up by the object. How can the new object that clearly does not contain the blobbie texture, call the blobbie texture it does not contain by a name that is not the UUID? Where is the texture located the new object is using that is called in the script? And if the script tried to run without the texture it needed, wouldn't it give an error something like, "Texture unable to be found."? Lovepeace
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
09-08-2005 11:08
Particle have a default texture that they use if no texture is defined or they can't find the called texture. They're little white dots if memory serves. It's possible that both scripts are calling that, despite the presence of a texture in the inventory of one.
|