diff --git a/AVsitter2/Plugins/AVprop/[AV]object.lsl b/AVsitter2/Plugins/AVprop/[AV]object.lsl index aae90df..0d61301 100644 --- a/AVsitter2/Plugins/AVprop/[AV]object.lsl +++ b/AVsitter2/Plugins/AVprop/[AV]object.lsl @@ -21,6 +21,7 @@ integer prop_id; integer prop_point; integer experience_denied_reason; key originalowner; +key parentkey; key give_prop_warning_request; unsit_all() @@ -89,6 +90,11 @@ state prop { llSetClickAction(CLICK_ACTION_TOUCH); } + if(llGetStartParameter()) + { + parentkey = llList2String(llGetObjectDetails(llGetKey(), [OBJECT_REZZER_KEY]), 0); + llSetTimerEvent(10); + } } attach(key id) @@ -235,6 +241,22 @@ state prop llSay(comm_channel, "SAVEPROP|" + (string)prop_id); } } + + timer() + { + //the parent key should be stored global? + if(llGetBoundingBox(parentkey) == []) + { + if(!llGetAttached()) + { + llDie(); + } + else + { + llRequestPermissions(llGetOwner(), PERMISSION_ATTACH); + } + } + } } state restart_prop