LSL feature request. The described function does not exist. This article is a feature request.
returns the status of permuting the subset1 to subset2 and subset2 to subset1. It can be one of the [PERMUTATION_ABORTED, PERMUTATION_DONE,PERMUTATION_UNACHIEVED] if impossible and not done, possible and fully implemented, partly defined and implemented.
integer llPermuteLinkOrder( list subset1, list subset2, integer permutation_method );
Forced delay: 0.0 seconds. Energy: 10.0.
Returns an integer of the operation performed.
requires modifiable objects and that PERMISSION_CHANGE_LINKS is TRUE. Link number must not include avatar.
<lsl> integer gCount; integer gStatus; list resultsText = ["aborted","permuted","unachieved","unknown"]; list results;
default {
state_entry() { results = [PERMUTATION_ABORTED, PERMUTATION_DONE,PERMUTATION_UNACHIEVED]; } touch_start( integer num_detected) { if( llDetectedKey(0) == llGetOwner() ) llRequestPermissions(llGetOwner(), PERMISSION_CHANGE_LINKS); }
run_time_permissions( integer perm) { if(perm & PERMISSIONS_CHANGE_LINKS) { // in a linkset of 6 primitives... gStatus = llPermuteLinkOrder([1,5,3],[1,2],DEFAULT); llOwnerSay( "guess nr 1 : " + llList2String(resultsText, llListFindList(results,[gStatus]) ); //...returns "guess nr 1: unachieved"
gStatus = llPermuteLinkOrder([1,7,3],[1,2,6],DEFAULT); llOwnerSay( "guess nr 2 : " + llList2String(resultsText, llListFindList(results,[gStatus]) ); //...returns "guess nr 2: aborted"
gStatus = llPermuteLinkOrder([1,5,3],[1,2,4],DEFAULT); llOwnerSay( "guess nr 3 : " + + llList2String(resultsText, llListFindList(results,[gStatus]) ); //...returns "guess nr 3: permuted"
if(gStatus == 1) { gCount = lllGetNumberOfPrims(); while(gCount--) llSetLinkPrimtiveParams(gCount,[PRIM_TEXT,(string)gCount,<1.,1.,1.>,1.]); //... to put the link number on the prims, or do many similar operations on prims } } } }</lsl>
an llSetLinkNumber function would not work
used for changing a child prim or unlinking them in a given order. This in view of hierarchy of links and organizing operations on child prims. Should work also when attached.
feature request SCR-361
key words: link number, linkset, child, hierarchization