I'm new to scripting and I'm just trying to create more scripts for practice.
Right now I am trying to create a script that I can put into a prim, drop a texture, have certain sides change texture and then have the texture and script be deleted from the prim's inventory.
The problem I am having is when I call the delete_all_contents() (more specifically, when the texture is deleted) function the faces are reset to default due to the changed() function. I'm assuming because the script is still inside even though it is deleted. Any tips on how I can fix this?
string thisScript = llGetScriptName();
integer index = llGetInventoryNumber(INVENTORY_ALL);
--index; // (faster than index--;)
inventoryItemName = llGetInventoryName(INVENTORY_ALL, index);
if (change & CHANGED_INVENTORY)
llOwnerSay("The inventory has changed.");
string name = llGetInventoryName(INVENTORY_TEXTURE, 0);
// transparent texture
string trans = "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903";
// Sets all sides transparent, because I want the rim to be transparent
// Sets texture on front and back faces
llOwnerSay("Milou's Simple Texture change Prim thingy");