Skip to content

Instantly share code, notes, and snippets.

@antonyfairport
Created November 3, 2014 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonyfairport/8caf941d004d94ea0346 to your computer and use it in GitHub Desktop.
Save antonyfairport/8caf941d004d94ea0346 to your computer and use it in GitHub Desktop.
Remove textures from an object's ivnentory
CleanTextures()
{
integer iMax = llGetInventoryNumber( INVENTORY_TEXTURE );
integer i;
for ( i = ( iMax - 1 ); i >= 0; i-- )
{
llRemoveInventory( llGetInventoryName( INVENTORY_TEXTURE, i ) );
}
}
default
{
state_entry()
{
CleanTextures();
llRemoveInventory( llGetScriptName() );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment