1 //originally written by Davide Byron
2 //this code is released under the GPLv3
4 // Reacts to E_NEW_INVENTORY_TEXTURE event
5 // When a new texture is received it's immediately used
8 // a creature with this script is able to change the texture if a user or another creature drops one
9 // into it's inventory. To be used it needs to have also the inventory manager script, or the
10 // new texture event won't be generated.
12 // WARNING: due to an unresolved bug the texture passed could not be the last one dropped
14 //dedicated to Mealea, thanks for the passion you put into things and for being able to pass it on to me :)
17 integer E_NEW_INVENTORY_TEXTURE
= 15;
35 //this should help humans knows what this creature can do
36 llSetObjectDesc( llGetObjectDesc() + "drop a texture to inventory for me to 'wear' it-" );
43 link_message( integer sender_num
, integer num
, string str
, key id
)
45 //if a message of a new texture arrives, put the texture on as a skin
46 if(num
== E_NEW_INVENTORY_TEXTURE
)
48 //apply the texture to the whole linked set
49 llSetLinkTexture(LINK_SET
, str
, ALL_SIDES
);