Jump to content
  • 0

Split an object into multiple


naughtyniece
 Share

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

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

Question

  • 0

Yes, you could have done the whole thing with one prim.  The llDetectedTouchST function in LSL lets you find out exactly where a person clicked on a prim's face.  So, you can map the texture that you are using for your calendar and then tell easily whether someone clicked in the area that's outlined by Day One or Day Two  or whatever.

touch_start(integer num){    vector Where = llDetectedTouchST(0);    if (Where.x > 0.1 && Where.x < 0.2 && Where.y > 0.1 && Where.y < 0.2)    {        llSay(0,"Someone clicked in the area with 0.1 < X < 0.2 and 0.1 < Y < 0.2 !");    }    //  And so forth}

You can of course nest the if tests to make the script most efficient since you are testing for 24 different areas, but that's the general idea.

  • Like 2
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Yes, you could have done the whole thing with one prim.  The llDetectedTouchST function in LSL lets you find out exactly where a person clicked on a prim's face.  So, you can map the texture that you are using for your calendar and then tell easily whether someone clicked in the area that's outlined by Day One or Day Two  or whatever.

touch_start(integer num){    vector Where = llDetectedTouchST(0);    if (Where.x > 0.1 && Where.x < 0.2 && Where.y > 0.1 && Where.y < 0.2)    {        llSay(0,"Someone clicked in the area with 0.1 < X < 0.2 and 0.1 < Y < 0.2 !");    }    //  And so forth}

You can of course nest the if tests to make the script most efficient since you are testing for 24 different areas, but that's the general idea.

  • Like 2
Link to comment
Share on other sites

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