Jump to content

PRIM_ALPHA_MODE_MASK not taking hold


You are about to reply to a thread that has been inactive for 687 days.

Please take a moment to consider if this thread is worth bumping.

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?

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
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
Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 687 days.

Please take a moment to consider if this thread is worth bumping.

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...