Jump to content
Wandering Soulstar

PRIM_ALPHA_MODE_MASK not taking hold

Recommended Posts

Hi All,

Have some behavior that I am not clear why it is happening, and was hoping someone could point me in the right direction. following is the snippet of code that executes:

    //Set Texture
    llSetTexture(text, ALL_SIDES);

    //if open texture .. then set alpha mask
    if (text == OPEN_TEXT)
    {
        llSetLinkPrimitiveParamsFast(LINK_ROOT, [PRIM_ALPHA_MODE, ALL_SIDES, PRIM_ALPHA_MODE_MASK, 200]);
    }

What is happening is that when this is run in a new prim, ALPHA_MODE_MASK is not getting set. If I go into the prim's properties in the editor, the Alpha mode is still set to none, but as soon as I set it there to masking, the cutoff is at the 200 that I passed in the function call ... so what gives? How can part of the parameters be set, but not the others?

Share this post


Link to post
Share on other sites

I wish I knew.  That's potentially a rather helpful parameter but I have found it to be unreliable when I have tried it, so I've given up trying. My experience has been the same as yours.

  • Sad 1

Share this post


Link to post
Share on other sites
6 hours ago, Wandering Soulstar said:

What is happening is that when this is run in a new prim, ALPHA_MODE_MASK is not getting set.

I think the problem may be that you're tying to set the properties of LINK_ROOT in an unlinked prim.   Try LINK_THIS or llGetLinkNumber() instead.

Edited by Innula Zenovka

Share this post


Link to post
Share on other sites

Innula .. am setting in the root link of a linked prim set. As I said, the setting gets there partially, i.e. the cutoff value (200) is there .. it is just the Alpha mode is not being changed to masking.

Share this post


Link to post
Share on other sites

ok, tested it and I can confirm the behaviour.

llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_ALPHA_MODE, ALL_SIDES, PRIM_ALPHA_MODE_NONE, 200]);
llSleep(0.1);
llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_ALPHA_MODE, ALL_SIDES, PRIM_ALPHA_MODE_MASK, 200]);

That solved the issue.
Don't know if the sleep is necessary. I couldn't test it again. The 2nd cube I rezzed behaved differently and works fine with the original script.

Funny :D

 

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...