LlAttachToAvatarTemp
De DigiWiki.
(Différences entre les versions)
Djphil (discuter | contributions)
(Page créée avec « <lsl> //-- rez object on ground, drop in this script, it will request permissions to attach, //-- and then attach to the left hand if permission is granted. if permission is … »)
Modification suivante →
(Page créée avec « <lsl> //-- rez object on ground, drop in this script, it will request permissions to attach, //-- and then attach to the left hand if permission is granted. if permission is … »)
Modification suivante →
Version du 25 juin 2012 à 22:58
//-- rez object on ground, drop in this script, it will request permissions to attach, //-- and then attach to the left hand if permission is granted. if permission is denied, //-- then the script complains. default { state_entry() { llRequestPermissions( llGetOwner(), PERMISSION_ATTACH ); } run_time_permissions( integer vBitPermissions ) { if( vBitPermissions & PERMISSION_ATTACH ) { llAttachToAvatarTemp">llAttachToAvatarTemp( ATTACH_LHAND ); } else { llOwnerSay( "Permission to attach denied" ); } } on_rez(integer rez) { if(!llGetAttached()) { //reset the script if it's not attached. llResetScript(); } } attach(key AvatarKey) { if(AvatarKey) {//event is called on both attach and detach, but Key is only valid on attach integer test = llGetAttached(); if (test) { llOwnerSay( "The object is attached" ); } else { llOwnerSay( "The object is not attached"); } } } }