/////////////////////////////////////////////////////////////////////////// // Copyright (C) Wizardry and Steamworks 2011 - License: GNU GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html for legal details, // // rights of fair usage, the disclaimer and warranty conditions. // /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // INTERNALS // /////////////////////////////////////////////////////////////////////////// default { state_entry() { // set sit target, otherwise sitting will not work llSitTarget(<-.8,.0,-1>, llEuler2Rot(<0,275,180> * DEG_TO_RAD)); // set the mouse click action to sit llSetClickAction(CLICK_ACTION_SIT); } changed(integer change) { if(change & CHANGED_LINK) { if(llAvatarOnSitTarget()) { llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION); } } } run_time_permissions(integer perm) { if(perm & PERMISSION_TRIGGER_ANIMATION) { if(llGetInventoryType("Sit Relaxed") == INVENTORY_ANIMATION) llStartAnimation("Sit Relaxed"); } } }