Mantis Bug Tracker

View Revisions: Issue #7960 All Revisions ] Back to Issue ]
Summary 0007960: llAttachToAvatarTemp() child prims not rezzing as part of hud
Revision 2016-07-09 16:54 by Total Sorbet
Steps To Reproduce Rez 6 small prims 0.05 x 0.05 x 0.05 and stack them on top of one another to make vertical tower. Link them.

Then place following script inside root:

key gAttachTo=NULL_KEY; //key of avatar to attach to
integer gCountPerm=0; //permission request counter
integer gPrims; //number of prims in linkset

grab_perms()
    {
    ++gCountPerm;
    llRequestPermissions(gAttachTo,PERMISSION_ATTACH);
    }

default
    {
    timer()
        {
        llSetLinkPrimitiveParams((integer)llFrand(gPrims)+1,[PRIM_COLOR,ALL_SIDES,<llFrand(1.0),llFrand(1.0),llFrand(1.0)>,1.0]);
        }
    state_entry()
        {
        gPrims=llGetObjectPrimCount(llGetKey());
        llSetTimerEvent(0.5);
        }
    on_rez(integer n)
        {
        llResetScript();
        }
    touch_start(integer n)
        {
        if(gAttachTo==NULL_KEY)
            {
            gAttachTo=llDetectedKey(0);
            grab_perms();
            }
        }
    run_time_permissions(integer p)
        {
        if(p & PERMISSION_ATTACH)
            {
            if(gCountPerm==1)
                {
                llAttachToAvatarTemp(35);
                grab_perms();
                }
            else if(gCountPerm==2)
                {
                llSay(0,"Attached!");
                }
            }
        else
            {
            llSay(0,"Not attached, permission denied.");
            gAttachTo=NULL_KEY;
            }
        }
    }

Set perms on object and script to copy/trans

Take copy into inventory :)

Click object to attach.

You should see the cubes attached vertically to centre hud and changing colour randomly.

My alt only ever sees the root prim on centre hud. Child prims are not visible. Sometimes nothing is visible.

Strangely if the attachment point is changed to the alts right hand llAttachToAvatarTemp(6); both the alt and object creator will see all 6 prims yet only the root prim will change colour. This is not the case if the object is attached to object creators hand where both alt and creator see all 6 prims changing colour.
Revision 2016-07-09 10:29 by Total Sorbet
Steps To Reproduce Rez 6 small prims 0.05 x 0.05 x 0.05 and stack them on top of one another to make vertical tower.

Then place following script inside root:

key gAttachTo=NULL_KEY; //key of avatar to attach to
integer gCountPerm=0; //permission request counter
integer gPrims; //number of prims in linkset

grab_perms()
    {
    ++gCountPerm;
    llRequestPermissions(gAttachTo,PERMISSION_ATTACH);
    }

default
    {
    timer()
        {
        llSetLinkPrimitiveParams((integer)llFrand(gPrims)+1,[PRIM_COLOR,ALL_SIDES,<llFrand(1.0),llFrand(1.0),llFrand(1.0)>,1.0]);
        }
    state_entry()
        {
        gPrims=llGetObjectPrimCount(llGetKey());
        llSetTimerEvent(0.5);
        }
    on_rez(integer n)
        {
        llResetScript();
        }
    touch_start(integer n)
        {
        if(gAttachTo==NULL_KEY)
            {
            gAttachTo=llDetectedKey(0);
            grab_perms();
            }
        }
    run_time_permissions(integer p)
        {
        if(p & PERMISSION_ATTACH)
            {
            if(gCountPerm==1)
                {
                llAttachToAvatarTemp(35);
                grab_perms();
                }
            else if(gCountPerm==2)
                {
                llSay(0,"Attached!");
                }
            }
        else
            {
            llSay(0,"Not attached, permission denied.");
            gAttachTo=NULL_KEY;
            }
        }
    }

Set perms on object and script to copy/trans

Take copy into inventory :)

Click object to attach.

You should see the cubes attached vertically to centre hud and changing colour randomly.

My alt only ever sees the root prim on centre hud. Child prims are not visible. Sometimes nothing is visible.

Strangely if the attachment point is changed to the alts right hand llAttachToAvatarTemp(6); both the alt and object creator will see all 6 prims yet only the root prim will change colour. This is not the case if the object is attached to object creators hand where both alt and creator see all 6 prims changing colour.


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker