Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer iButtonCount = 16;
- integer iPictureFrameRows = 4;
- integer iPictureFrameColumns = 5;
- integer iTouchFace = 1;
- string sButton = "Button #";
- fButton(integer i)
- {
- llWhisper(PUBLIC_CHANNEL, sButton+(string)i);
- }
- default
- {
- state_entry()
- {
- }
- touch_start(integer total_number)
- {
- vector vPUV = llDetectedTouchST(0);
- if (llDetectedTouchFace(0) == iTouchFace)
- {
- integer iHorizontal = llFloor(iPictureFrameRows*vPUV.x);
- integer iVertikal = llFloor(iPictureFrameColumns* (1-vPUV.y));
- integer iBild = 1 + iHorizontal + iVertikal * iPictureFrameRows;
- if (iBild <= iButtonCount)
- {
- fButton(iBild);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement