Jump to content

question: script function,changing tranluscent factor and pass-through at the same time on touch


MishkaKatyusha
 Share

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

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

Recommended Posts

well i worked out how to edit the DOOR_NAME thing to the object name.and it is indeed functioning like i want (still need to decide on something to be the master prim though,since atm its basically just a solid mesh object set to prim)

 

bit of a problem though,im trying to set the color,translucency and glow factor when its solid,im currently trying PRIM_COLOR under the little green solid header like this

PRIM_COLOR (0.941, 0.071, 0.745)

cause the color im going for is a sort of fuschia like color

but i keep on getting syntax error >.>

Link to comment
Share on other sites

ah!i understand now,i wasnt sure whether that line illustrated seperate functions or whether it was a complete function.but i figred it yay ^-^ now to add to my small arsenal of LSL abilitys,being able to turn something into a fuschia color

PRIM_COLOR , ALL_SIDES, <0.941, 0.071, 0.745>, 0.60 

 

(also just figured out how to edit the alpha for the solid part) 

Link to comment
Share on other sites

now the only remaining part is figuring what to set as the master prim.

 

a couple of question i have though

 

would a small little sphere or the like suffice for the master prim? (the door itself would have to be set to prim as given the odd shape of the entranceway,adn that the door is custom molded for it)

and would i be able to link the door with the house or would it act weird?

(ah,found something and managed to fix it all by myself xD.i needed the prim physics for the door solid state  to be prim and not convex)

[ PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_PRIM    // solid, PRIM_COLOR , ALL_SIDES, <0.941, 0.071, 0.745>, 0.60
Link to comment
Share on other sites

X.X my lord i didnt think it possible but it just worked.i set a tiny little sphere to max transparency,linked it to the door,set the sphere as the master prim

so thanks be to you innula and qie,this beauty of a script has fulfilled what i was looking for

string DOOR_NAME = "alien house door true deal";  // name of the door linkinteger doorLink;integer open = FALSE;findDoorLink(){   // subroutine to identify which link is the door, which will get parameter-toggled    integer thisLink = llGetNumberOfPrims();    do    {        if (DOOR_NAME == llGetLinkName(thisLink))        {            doorLink = thisLink;            return;        }    }    while ( --thisLink);//reduce the value of thisLink each time    // if we ever get down to 0, there's no link named DOOR_NAME    llWhisper(DEBUG_CHANNEL, "name your door link and reset this script.");}     default{    state_entry()    {        findDoorLink();    }    changed(integer change)    {        if (CHANGED_LINK & change)            findDoorLink();    }    touch_start(integer total_number)    {        if (open)        {            llSetLinkPrimitiveParamsFast(doorLink,                [ PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_PRIM    // solid, PRIM_COLOR , ALL_SIDES, <0.941, 0.071, 0.745>, 0.60   // visible                ]);        }        else        {            llSetLinkPrimitiveParamsFast(doorLink,                [ PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_NONE  // pass-through-able                , PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 0.0   // hidden                ]);                    }        open = !open;    }}
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3022 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...