Yes, you could have done the whole thing with one prim. The llDetectedTouchSTfunction 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(integernum){ vectorWhere = 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 iftests to make the script most efficient since you are testing for 24 different areas, but that's the general idea.
Question
Rolig Loon
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.
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.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
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