Jump to content

PRIM_ALPHA_MODE_MASK not taking hold


Wandering Soulstar
 Share

You are about to reply to a thread that has been inactive for 2000 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 comment
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 comment
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 comment
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...