Holo Display
Created by Kira Komarov.
Tile-Related Tree
+-------------------------+ | Planar Tile Generator | +------------+------------+ | +---------------------+---------------------------+-------------------------+ | | | | +------------+-------------+ +----------------+ +-------------+-------------+ +--------+-------+ | Spatial Tile Generator | | Holo Display | | Planar Fibbonacci Tiles | | Snake Game | +--------------------------+ +----------------+ +---------------------------+ +----------------+
Introduction
One of the commercial and very expensive objects you can purchase on marketplace is a zero-primitive holo display. That is, the object is a board that will display text messages by changing the texture of the tiles. However, since for a simple 10x10-tile board one would already consume 100 primitives, the board contains a mechanism that continuously rezzes the tiles as temporary over and over again and applies the corresponding letter texture.
This is the free version, courtesy of Wizardry and Steamworks.
Similar to projects such as the Volleyball Game (Kira's Artillery Variations), this mechanism is for scripters that wish to expand upon the concept.
Setup
The Holo Display is made of two parts:
- The [K] Holo Panel.
- The [K] Holo Tile.
Both objects are named, meaning that the scripts rely on them having exactly those names.
Tile to be Rezzed
The [K] Holo Tile is a primitive that contains just one script:
- [K] Holo which listens to llWhisper messages and sets the tile texture.
and the following textures which are created by Steve Matteson and carries an Apache License which is compatible with GNU GPLv3:
File | Second Life Asset UUID |
OpenSans Regular Font ASCII Number 126 | d8b54f47-56cc-a306-e08d-7ccc17d973f1 |
OpenSans Regular Font ASCII Number 125 | 65a27c6e-dbcc-c7a6-b79e-5e4b85480f56 |
OpenSans Regular Font ASCII Number 124 | 773b742a-0b17-c412-61c9-46da7a4fd188 |
OpenSans Regular Font ASCII Number 123 | 73c81fad-fe69-c9c1-e624-1e62121619a7 |
OpenSans Regular Font ASCII Number 122 | e3b11806-6fc2-c93a-0395-8460ef262a1b |
OpenSans Regular Font ASCII Number 121 | 4137395e-adcc-fb88-73ff-b30e721bc81c |
OpenSans Regular Font ASCII Number 120 | fcfa1923-097e-44b3-faf6-9b7070c5dd75 |
OpenSans Regular Font ASCII Number 119 | c8997016-7d81-542e-0160-a534936ba5f9 |
OpenSans Regular Font ASCII Number 118 | 34fa461b-9789-da82-7d03-ff596c49078d |
OpenSans Regular Font ASCII Number 117 | e3a71a2a-3901-82d0-0047-d20ed37a334f |
OpenSans Regular Font ASCII Number 116 | 4dda7e97-fdff-c9d0-2d58-540b9e888475 |
OpenSans Regular Font ASCII Number 115 | 0994a922-e4b6-fd37-5c98-c04c37b83b46 |
OpenSans Regular Font ASCII Number 114 | 6d07262d-198c-8267-eb9e-34252fd92a17 |
OpenSans Regular Font ASCII Number 113 | 93ee26d4-3cad-b840-9e51-fbaa66a70030 |
OpenSans Regular Font ASCII Number 112 | 8e1a7884-b653-06a2-27ae-df7bad1b38af |
OpenSans Regular Font ASCII Number 111 | 52f426ad-a960-32f6-6f91-17ebf007f346 |
OpenSans Regular Font ASCII Number 110 | f74c18a9-3ac8-d40d-b04b-954ff50bc800 |
OpenSans Regular Font ASCII Number 109 | 4933e0cb-13d0-6be0-e4e7-fc28f3b7dd1f |
OpenSans Regular Font ASCII Number 108 | 757c7c0b-b686-a86b-b817-b2f168ab95cd |
OpenSans Regular Font ASCII Number 107 | 466ea6e8-9497-d796-14c3-db04645fe3f0 |
OpenSans Regular Font ASCII Number 106 | 63aeaa2a-abbd-2098-4338-e42f16c82798 |
OpenSans Regular Font ASCII Number 105 | afa14604-4770-5070-ada1-7a7846b7ac50 |
OpenSans Regular Font ASCII Number 104 | 3e7101d9-ad42-6ba0-0d85-6e4ee6dc338d |
OpenSans Regular Font ASCII Number 103 | 0b3730e8-87c3-99ae-3fa6-d51fb8f6802d |
OpenSans Regular Font ASCII Number 102 | ef3eff41-2c6e-1e70-ec7f-7f44d1bd62f5 |
OpenSans Regular Font ASCII Number 101 | 4992e3b5-595c-a14b-2528-4dbb7f936d94 |
OpenSans Regular Font ASCII Number 100 | af7b4c4c-2ff7-80d3-2849-d5822addf287 |
OpenSans Regular Font ASCII Number 99 | fbc404a0-86c6-6ec0-e937-0a6beaada5bc |
OpenSans Regular Font ASCII Number 98 | b6595a6f-8715-b87b-232e-4ac7e87a9f7e |
OpenSans Regular Font ASCII Number 97 | ae5e56d4-bf7e-3028-cffe-9115a85dca53 |
OpenSans Regular Font ASCII Number 96 | 377e5b6c-5649-4eb4-13b8-127b264c8b5c |
OpenSans Regular Font ASCII Number 95 | 0b8719d7-2fe6-2bc5-9ee9-94a2bf39e52d |
OpenSans Regular Font ASCII Number 94 | ea6515b1-c436-9090-f593-6fc997e1baad |
OpenSans Regular Font ASCII Number 93 | f91c30ad-1f41-0161-1ece-730c66a15625 |
OpenSans Regular Font ASCII Number 92 | 90da5e13-d0f9-3bd1-0753-20b23c5bfc13 |
OpenSans Regular Font ASCII Number 91 | f3ba29bd-cdb0-2a27-a7f5-84bfefde1eb4 |
OpenSans Regular Font ASCII Number 90 | a0e9567d-abc6-be31-e526-b43cf5d36518 |
OpenSans Regular Font ASCII Number 89 | 039447f7-7824-efe7-46fe-b59471616cdb |
OpenSans Regular Font ASCII Number 88 | 2675b59d-ad29-9969-e5a3-34ca5345d510 |
OpenSans Regular Font ASCII Number 87 | f37cdc18-bf3c-4d39-c8d8-4a6708fcce8a |
OpenSans Regular Font ASCII Number 86 | e0954dc1-7641-6179-f238-bd3a95a7a753 |
OpenSans Regular Font ASCII Number 85 | d01fafd5-da8f-e8b1-761d-1d204c65ae5c |
OpenSans Regular Font ASCII Number 84 | 0fb0b222-bb4b-2383-5c01-66fdad9e5ad6 |
OpenSans Regular Font ASCII Number 83 | 662edfa4-7a5b-6fa0-c2dc-70032c15b4c9 |
OpenSans Regular Font ASCII Number 82 | 97e0be84-dc52-9147-8e25-75a1809f64d2 |
OpenSans Regular Font ASCII Number 81 | d0910e94-408b-7873-8523-12ca6c3eaffc |
OpenSans Regular Font ASCII Number 80 | d844c72c-baa8-e449-278a-15d1986bbcd5 |
OpenSans Regular Font ASCII Number 79 | 53909715-1cea-5b39-d491-10c6a86f034d |
OpenSans Regular Font ASCII Number 78 | 23f068ef-e897-b69e-5bb3-c23079641e77 |
OpenSans Regular Font ASCII Number 77 | 0240ba93-8704-ceec-e917-1ec27792cc69 |
OpenSans Regular Font ASCII Number 76 | 82ed5956-835c-9580-769f-812dab6b6f04 |
OpenSans Regular Font ASCII Number 75 | ea2c5050-d95a-adbe-40b9-5b8208d377c9 |
OpenSans Regular Font ASCII Number 74 | cf878b0a-eb17-cf5f-abe0-2457d14a3209 |
OpenSans Regular Font ASCII Number 73 | 7f72b788-aa03-b12c-64d4-08ff42fd0d76 |
OpenSans Regular Font ASCII Number 72 | ce6cb5e3-4960-7c32-c5b9-60ef717e733d |
OpenSans Regular Font ASCII Number 71 | d1a1216f-fa64-93fb-e3ac-9b61935be0e7 |
OpenSans Regular Font ASCII Number 70 | 6898db10-e43e-08fb-cd7f-a78ea1ddd8a4 |
OpenSans Regular Font ASCII Number 69 | a2f9d98e-a0b6-3d34-669a-ff53aa6263e3 |
OpenSans Regular Font ASCII Number 68 | d524ddaf-0d05-bda5-aced-70871266d18e |
OpenSans Regular Font ASCII Number 67 | eafdb177-d952-bc02-fef8-6d5549c75dca |
OpenSans Regular Font ASCII Number 66 | 1d6449e4-4c7d-f84a-1472-b07559b0221e |
OpenSans Regular Font ASCII Number 65 | ee30cc90-918f-11fc-db29-412be076c0c1 |
OpenSans Regular Font ASCII Number 64 | 16fd6a5d-ff62-85c5-d6d7-1b86b498b458 |
OpenSans Regular Font ASCII Number 63 | 2135e922-4fb4-6e79-2f03-993938a50572 |
OpenSans Regular Font ASCII Number 62 | 64538835-67b3-1554-b8e0-4ddba7fb01be |
OpenSans Regular Font ASCII Number 61 | 8a6dd86c-488e-25f7-befc-3d30db7b789b |
OpenSans Regular Font ASCII Number 60 | 8b310383-376e-8a77-9c07-e3f71e0ef93c |
OpenSans Regular Font ASCII Number 59 | b61712f4-b492-b15f-76f3-701dae7ac8e6 |
OpenSans Regular Font ASCII Number 58 | 24f4146b-da33-2301-defe-0c473668f6eb |
OpenSans Regular Font ASCII Number 57 | 355bdc23-c7f2-83e8-84d1-c5fe72efe6c4 |
OpenSans Regular Font ASCII Number 56 | bf634086-3400-7753-17e1-eaa5daf1c505 |
OpenSans Regular Font ASCII Number 55 | e031e370-7a27-0515-1955-84e2fe48dd66 |
OpenSans Regular Font ASCII Number 54 | b42df016-eb61-02df-78b2-5490596ffe44 |
OpenSans Regular Font ASCII Number 53 | f7fd10e5-54db-4013-52ba-6c3aa16d58f7 |
OpenSans Regular Font ASCII Number 52 | 0fffbe33-258e-24c4-eb94-1b69e034225b |
OpenSans Regular Font ASCII Number 51 | 662cbeeb-b2e5-e65e-a347-938142c5ce3a |
OpenSans Regular Font ASCII Number 50 | 5569f0e7-8ee9-de8b-6bd0-b24f68e1191b |
OpenSans Regular Font ASCII Number 49 | 92595b6b-7551-6b7b-913e-38f1cb32cfa6 |
OpenSans Regular Font ASCII Number 48 | 36657cbe-a6c8-f812-912f-bb4ac661fd47 |
OpenSans Regular Font ASCII Number 47 | 4bddb509-aef0-55d3-4e04-2e4a67ea2aea |
OpenSans Regular Font ASCII Number 46 | 1c7f3347-ccf1-ee6f-6f91-d9a345aa2cf6 |
OpenSans Regular Font ASCII Number 45 | 50923169-33e0-c759-b5c0-19a4aa1e88b2 |
OpenSans Regular Font ASCII Number 44 | f72e316c-55d0-7c9a-c5d9-4d7df13f233d |
OpenSans Regular Font ASCII Number 43 | d5f4b2bf-d396-5ae9-500b-90283f5e8df4 |
OpenSans Regular Font ASCII Number 42 | 90823a84-3c64-60cd-35d0-cdcb1873371a |
OpenSans Regular Font ASCII Number 41 | 1ee3d1b0-3c00-eeec-7224-07690daa95ea |
OpenSans Regular Font ASCII Number 40 | af1b8821-725c-b3a9-4b58-57326ec6cacc |
OpenSans Regular Font ASCII Number 39 | c9e96d68-f2ae-d591-3bc7-31f56ff8a353 |
OpenSans Regular Font ASCII Number 38 | bb61bd21-8a84-3bce-bee8-d1ee23188637 |
OpenSans Regular Font ASCII Number 37 | 52aa48d3-40c4-2da2-e46f-1a98b33cb696 |
OpenSans Regular Font ASCII Number 36 | cf9bd934-eb7f-686e-918d-c6867ab36346 |
OpenSans Regular Font ASCII Number 35 | bd84abb9-5d0f-9697-6558-b633b2509373 |
OpenSans Regular Font ASCII Number 34 | a4406722-cd3b-d693-3bc1-61bed4249c13 |
OpenSans Regular Font ASCII Number 33 | 7a5d01e0-8841-cfa9-cd3e-f462a8a1ce03 |
OpenSans Regular Font ASCII Number 32 | 6325f460-f5e8-1d45-9764-d2a1fe790374 |
Wizardry and Steamworks wishes you a mellow time uploading 95 textures. xD Otherwise, you can alter the code and reference them there by using the texture asset UUID (key) and spare yourself a whopping L$950 (that's why we posted them here).
The last texture ASCII 32 with the asset UUID 6325f460-f5e8-1d45-9764-d2a1fe790374 is space, which is a blank texture. It may be used to create invisible primitives which are much better than the textures offered by hacked viewers (they don't seem to have collisions with water).
[K] Holo Panel
The [K] Holo Panel contains 5 scripts, some of them optional:
- [K] FTC which is the fast texture cacher from Wizardry and Steamworks (Optional but recommended).
- [K] Holo Display Tiler which is the Planar Tile Generator from Wizardry and Steamworks.
- [K] Regen which is a dispatcher for the rezzing script.
- [K] Rezzer which is a script that listens to link-messages from [K] Regen and rezzes a new tile in case one tile just died. You can have any number of these.
- [K] Transmit which listens to link-messages from [K] Rezzer.
All these scripts must be placed in a primitive named [K] Holo Panel.
Overview
Usage
Once you set-up the primitives, you can click the [K] Holo Panel to start deploying [K] Tiles. After all the [K] Tiles have been deployed, the [K] Holo Panel will stay there and process rez-requests. You can type something on local chat in order to test the system.
Extending
The code may of course be extended, depending on the application, to process messages from things such as llTextBox or add the messages line-by-line.
Code: [K] Holo
This part is supposed to go in the tile to be rezzed.
<lsl> ////////////////////////////////////////////////////////// // [K] Kira Komarov - 2011, License: GPLv3 with the// // exception of the Ord function created by Pedro // // Oval which carries an unknown license. // //////////////////////////////////////////////////////////
// Ord() function, written by Pedro Oval, 2010-05-28 // This function works by using llEscapeURL to find the corresponding UTF-8 // string then converts it to the Unicode code. In cases where llEscapeURL // doesn't help, a combination of llStringToBase64 and llBase64ToInteger // does the job instead. integer Ord(string chr) {
if (chr == "") return 0; string hex = llEscapeURL(chr); if (llGetSubString(hex, 0, 0) != "%") { // Regular character - we can't take advantage of llEscapeURL in this case, // so we use llStringToBase64/llBase64ToInteger instead. return llBase64ToInteger("AAAA" + llStringToBase64(llGetSubString(chr, 0, 0))); } integer b = (integer)("0x" + llGetSubString(hex, 1, 2)); if (b < 194 || b > 244) return b; if (b < 224) return ((b & 0x1F) << 6) | (integer)("0x" + llGetSubString(hex, 4, 5)) & 0x3F; integer cp; if (b < 240) { cp = (b & 0x0F) << 12; cp += ((integer)("0x" + llGetSubString(hex, 4, 5)) & 0x3F) << 6; cp += (integer)("0x" + llGetSubString(hex, 7, 8)) & 0x3F; return cp; } cp = (b & 0x07) << 18; cp += ((integer)("0x" + llGetSubString(hex, 4, 5)) & 0x3F) << 12; cp += ((integer)("0x" + llGetSubString(hex, 7, 8)) & 0x3F) << 6; cp += (integer)("0x" + llGetSubString(hex, 10, 11)) & 0x3F; return cp;
}
key _owner = NULL_KEY; string letter = ""; integer comChannel = 0;
default {
state_entry() { _owner = llGetOwner(); comChannel = ((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF; llListen(comChannel, "[K] Holo Panel", "", ""); } listen(integer channel, string name, key id, string message) { list pSet = llCSV2List(message); integer idx = llListFindList(pSet, (list)llGetObjectDesc()); if(~idx) letter = llList2String(pSet,idx+1); if(letter == "") letter = " "; llSetTexture("OpenSans_Regular_" + (string)Ord(letter), 3); } timer() { llWhisper(comChannel, "die," + llGetObjectDesc() + ",pos," + (string)llGetPos() + ",let," + letter); llDie(); } on_rez(integer param) { llSetTimerEvent(56.25); // alarm - see http://was.fm/wiki/Wizardry_and_Steamworks/Randomness,_Entropy_and_Statistics llSetObjectDesc((string)param); _owner = llGetOwner(); } changed(integer change) { if(change & CHANGED_OWNER) _owner = llGetOwner(); }
} </lsl>
Code: [K] FTC
This is the fast-texture cache adapted from Wizardry and Steamworks main page and should go in the rezzer itself.
<lsl> ////////////////////////////////////////////////////////// // [K] Kira Komarov - 2011, License: GPLv3 // ////////////////////////////////////////////////////////// // Requires: link message, string set to "kpre", string of // texture keys separated by commas. // Provides: link message, string set to "kok" when ready. ////////////////////////////////////////////////////////// // About: A script to cache textures and keep them alive. ////////////////////////////////////////////////////////// list slides = [ "d8b54f47-56cc-a306-e08d-7ccc17d973f1", "65a27c6e-dbcc-c7a6-b79e-5e4b85480f56", "773b742a-0b17-c412-61c9-46da7a4fd188", "73c81fad-fe69-c9c1-e624-1e62121619a7", "e3b11806-6fc2-c93a-0395-8460ef262a1b", "4137395e-adcc-fb88-73ff-b30e721bc81c", "fcfa1923-097e-44b3-faf6-9b7070c5dd75", "c8997016-7d81-542e-0160-a534936ba5f9", "34fa461b-9789-da82-7d03-ff596c49078d", "e3a71a2a-3901-82d0-0047-d20ed37a334f", "4dda7e97-fdff-c9d0-2d58-540b9e888475", "0994a922-e4b6-fd37-5c98-c04c37b83b46", "6d07262d-198c-8267-eb9e-34252fd92a17", "93ee26d4-3cad-b840-9e51-fbaa66a70030", "8e1a7884-b653-06a2-27ae-df7bad1b38af", "52f426ad-a960-32f6-6f91-17ebf007f346", "f74c18a9-3ac8-d40d-b04b-954ff50bc800", "4933e0cb-13d0-6be0-e4e7-fc28f3b7dd1f", "757c7c0b-b686-a86b-b817-b2f168ab95cd", "466ea6e8-9497-d796-14c3-db04645fe3f0", "63aeaa2a-abbd-2098-4338-e42f16c82798", "afa14604-4770-5070-ada1-7a7846b7ac50", "3e7101d9-ad42-6ba0-0d85-6e4ee6dc338d", "0b3730e8-87c3-99ae-3fa6-d51fb8f6802d", "ef3eff41-2c6e-1e70-ec7f-7f44d1bd62f5", "4992e3b5-595c-a14b-2528-4dbb7f936d94", "af7b4c4c-2ff7-80d3-2849-d5822addf287", "fbc404a0-86c6-6ec0-e937-0a6beaada5bc", "b6595a6f-8715-b87b-232e-4ac7e87a9f7e", "ae5e56d4-bf7e-3028-cffe-9115a85dca53", "377e5b6c-5649-4eb4-13b8-127b264c8b5c", "0b8719d7-2fe6-2bc5-9ee9-94a2bf39e52d", "ea6515b1-c436-9090-f593-6fc997e1baad", "f91c30ad-1f41-0161-1ece-730c66a15625", "90da5e13-d0f9-3bd1-0753-20b23c5bfc13", "f3ba29bd-cdb0-2a27-a7f5-84bfefde1eb4", "a0e9567d-abc6-be31-e526-b43cf5d36518", "039447f7-7824-efe7-46fe-b59471616cdb", "2675b59d-ad29-9969-e5a3-34ca5345d510", "f37cdc18-bf3c-4d39-c8d8-4a6708fcce8a", "e0954dc1-7641-6179-f238-bd3a95a7a753", "d01fafd5-da8f-e8b1-761d-1d204c65ae5c", "0fb0b222-bb4b-2383-5c01-66fdad9e5ad6", "662edfa4-7a5b-6fa0-c2dc-70032c15b4c9", "97e0be84-dc52-9147-8e25-75a1809f64d2", "d0910e94-408b-7873-8523-12ca6c3eaffc", "d844c72c-baa8-e449-278a-15d1986bbcd5", "53909715-1cea-5b39-d491-10c6a86f034d", "23f068ef-e897-b69e-5bb3-c23079641e77", "0240ba93-8704-ceec-e917-1ec27792cc69", "82ed5956-835c-9580-769f-812dab6b6f04", "ea2c5050-d95a-adbe-40b9-5b8208d377c9", "cf878b0a-eb17-cf5f-abe0-2457d14a3209", "7f72b788-aa03-b12c-64d4-08ff42fd0d76", "ce6cb5e3-4960-7c32-c5b9-60ef717e733d", "d1a1216f-fa64-93fb-e3ac-9b61935be0e7", "6898db10-e43e-08fb-cd7f-a78ea1ddd8a4", "a2f9d98e-a0b6-3d34-669a-ff53aa6263e3", "d524ddaf-0d05-bda5-aced-70871266d18e", "eafdb177-d952-bc02-fef8-6d5549c75dca", "1d6449e4-4c7d-f84a-1472-b07559b0221e", "ee30cc90-918f-11fc-db29-412be076c0c1", "16fd6a5d-ff62-85c5-d6d7-1b86b498b458", "2135e922-4fb4-6e79-2f03-993938a50572", "64538835-67b3-1554-b8e0-4ddba7fb01be", "8a6dd86c-488e-25f7-befc-3d30db7b789b", "8b310383-376e-8a77-9c07-e3f71e0ef93c", "b61712f4-b492-b15f-76f3-701dae7ac8e6", "24f4146b-da33-2301-defe-0c473668f6eb", "355bdc23-c7f2-83e8-84d1-c5fe72efe6c4", "bf634086-3400-7753-17e1-eaa5daf1c505", "e031e370-7a27-0515-1955-84e2fe48dd66", "b42df016-eb61-02df-78b2-5490596ffe44", "f7fd10e5-54db-4013-52ba-6c3aa16d58f7", "0fffbe33-258e-24c4-eb94-1b69e034225b", "662cbeeb-b2e5-e65e-a347-938142c5ce3a", "5569f0e7-8ee9-de8b-6bd0-b24f68e1191b", "92595b6b-7551-6b7b-913e-38f1cb32cfa6", "36657cbe-a6c8-f812-912f-bb4ac661fd47", "4bddb509-aef0-55d3-4e04-2e4a67ea2aea", "1c7f3347-ccf1-ee6f-6f91-d9a345aa2cf6", "50923169-33e0-c759-b5c0-19a4aa1e88b2", "f72e316c-55d0-7c9a-c5d9-4d7df13f233d", "d5f4b2bf-d396-5ae9-500b-90283f5e8df4", "90823a84-3c64-60cd-35d0-cdcb1873371a", "1ee3d1b0-3c00-eeec-7224-07690daa95ea", "af1b8821-725c-b3a9-4b58-57326ec6cacc", "c9e96d68-f2ae-d591-3bc7-31f56ff8a353", "bb61bd21-8a84-3bce-bee8-d1ee23188637", "52aa48d3-40c4-2da2-e46f-1a98b33cb696", "cf9bd934-eb7f-686e-918d-c6867ab36346", "bd84abb9-5d0f-9697-6558-b633b2509373", "a4406722-cd3b-d693-3bc1-61bed4249c13", "7a5d01e0-8841-cfa9-cd3e-f462a8a1ce03", "6325f460-f5e8-1d45-9764-d2a1fe790374" ];
integer gitra = 0;
default {
state_entry() { // Thanks for the music Salahzar Stenvaag, 10 faces is cool! llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_PRISM, 32, <0.199, 0.8, 0.0>, 0.30, <0.0, 0.0, 0.0>, <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, PRIM_SIZE, <0.03, 2.89, 0.5>, PRIM_COLOR, ALL_SIDES, <1,1,1>, 0.0 ]); llSetTimerEvent(1.02-llGetRegionTimeDilation()); } timer() { llSetTimerEvent(0); if(gitra == llGetListLength(slides)) { gitra = 0; } integer itra=llGetNumberOfSides()-1; do { if(llList2Key(slides, gitra+itra)) llSetTexture(llList2Key(slides, gitra+itra), itra); } while(--itra>-1); ++gitra; llSetTimerEvent(1.02-llGetRegionTimeDilation()); }
} </lsl>
Code: [K] Holo Display Tiler
This is just Planar Tile Generator and should go in the rezzer.
<lsl> ////////////////////////////////////////////////////////// // [K] Komarov - 2011, License: GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html // // for legal details, rights of fair usage and // // the disclaimer and warranty conditions. // //////////////////////////////////////////////////////////
////////////////////////////////////////////////////////// // CONFIGURATION // ////////////////////////////////////////////////////////// // The height of the generated board. integer BOARD_HEIGHT = 10; // The width of the generated board. integer BOARD_WIDTH = 10; // The delay between rezzing the object in the primitive. float SPEED = 0.2; // Set this to the scale of the primitive inside the object. vector OBJECT_SCALE = <0.1,0.1,0.1>; // Set this to the name of the object to rez. string TILE_NAME = "[K] Holo Tile";
////////////////////////////////////////////////////////// // INTERNALS // ////////////////////////////////////////////////////////// integer runner = 0; integer gitra = 0; integer gitrb = 0; vector tilePos = ZERO_VECTOR;
default {
state_entry() { llSay(0, "Click the glowing prim to deploy more tiles."); } touch_start(integer total_number) { // Sanity. if(BOARD_HEIGHT*BOARD_WIDTH < 1) { llSay(DEBUG_CHANNEL, "Sorry, the width and height have to be larger than zero. Aborting."); return; } if(TILE_NAME == "") { llSay(DEBUG_CHANNEL, "Sorry, I could not find an object in the inventory to rez. Aborting."); return; } runner = BOARD_HEIGHT*BOARD_WIDTH; tilePos = llGetPos(); state deploy; }
}
state deploy {
state_entry() { llSay(0, "Please wait, deploying prims. Touch To stop..."); llSetTimerEvent(SPEED); } touch_start(integer num) { llSetTimerEvent(0); state default; } timer() { llSetTimerEvent(0); if(runner > BOARD_WIDTH*BOARD_HEIGHT) { state default; return; } if(gitrb < BOARD_HEIGHT) { if(gitra < BOARD_WIDTH-1) { llRezObject(TILE_NAME,tilePos,ZERO_VECTOR,ZERO_ROTATION,runner--); tilePos.x += OBJECT_SCALE.x; llSetPos(tilePos); // llSetLinkPrimitiveParamsFast(LINK_THIS, [OBJECT_POS, tilePos]); // Thanks, FailedNoob Resident. - SL Compatible ++gitra; llSetTimerEvent(SPEED); return; } llRezObject(TILE_NAME,tilePos,ZERO_VECTOR,ZERO_ROTATION,runner--); tilePos.z += OBJECT_SCALE.z; tilePos.x -= (BOARD_WIDTH-1)*OBJECT_SCALE.x; llSetPos(tilePos); // llSetLinkPrimitiveParamsFast(LINK_THIS, [OBJECT_POS, tilePos]); // Thanks, FailedNoob Resident. - SL Compatible //OBJECT_SCALE.x *= -1; ++gitrb; gitra = 0; llSetTimerEvent(SPEED); return; } }
} </lsl>
Code: [K] Regen
This is the regenerator that dispatches rez requests to the rezzers and should go in the rezzer primitive itself.
<lsl> ////////////////////////////////////////////////////////// // [K] Komarov - 2011, License: GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html // // for legal details, rights of fair usage and // // the disclaimer and warranty conditions. // //////////////////////////////////////////////////////////
// Set this to the amount of rezzers. integer REZZERS = 5;
key _owner = NULL_KEY; integer runner = 0;
default {
state_entry() { _owner = llGetOwner(); integer comChannel = ((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF; llListen(comChannel, "[K] Holo Tile", "", ""); } listen(integer channel, string name, key id, string message) { if(runner >= REZZERS) runner = 0; llMessageLinked(LINK_THIS, runner++, message, "rez"); } on_rez(integer param) { _owner = llGetOwner(); } changed(integer change) { if(change & CHANGED_OWNER) { _owner = llGetOwner(); } }
} </lsl>
Code: [K] Rezzer
This is one of the rezzers. You must configure the REZZER_ID in the configuration section of the script and set it for each rezzer you want to have. This script should go in the rezzer itself.
<lsl> ////////////////////////////////////////////////////////// // [K] Komarov - 2011, License: GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html // // for legal details, rights of fair usage and // // the disclaimer and warranty conditions. // //////////////////////////////////////////////////////////
////////////////////////////////////////////////////////// // CONFIGURATION // ////////////////////////////////////////////////////////// // The id of the rezzer, change this for as many rezzers as // you wish to have. First rezzer has an ID of 0, second 1, ... integer REZZER_ID = 0; ////////////////////////////////////////////////////////// // INTERNALS // //////////////////////////////////////////////////////////
default {
link_message(integer sender_num, integer num, string str, key id) { if(id != "rez" || num != REZZER_ID) return; list dList = llCSV2List(str); vector tilePos = ZERO_VECTOR; list tileVec = llParseString2List(llList2String(dList,3), ["<", ">", ","], []); tilePos.x = llList2Float(tileVec, 0); tilePos.y = llList2Float(tileVec, 1); tilePos.z = llList2Float(tileVec, 2); llRezObject("[K] Holo Tile",tilePos,ZERO_VECTOR,ZERO_ROTATION,llList2Integer(dList,1)); if(llList2String(dList, 5) == "") return; llMessageLinked(LINK_THIS, llList2Integer(dList, 1), llList2String(dList, 5), "bcst"); }
} </lsl>
Code: [K] Transmit
This part sends off the messages to the tiles as well as updating the tiles with the messages on local chat. You must configure the BOARD_HEIGHT and BOARD_WIDTH to be identical to the size of the board you generated with the [K] Holo Display Tiler. This part should go into the rezzer as well.
<lsl> ////////////////////////////////////////////////////////// // [K] Komarov - 2011, License: GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html // // for legal details, rights of fair usage and // // the disclaimer and warranty conditions. // //////////////////////////////////////////////////////////
////////////////////////////////////////////////////////// // CONFIGURATION // ////////////////////////////////////////////////////////// // Set this to the height of the board. integer BOARD_HEIGHT = 10; // Set this to the width of the board. integer BOARD_WIDTH = 10; ////////////////////////////////////////////////////////// // INTERNALS // //////////////////////////////////////////////////////////
key _owner = NULL_KEY; integer comChannel = 0;
default {
state_entry() { _owner = llGetOwner(); comChannel = ((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF; llListen(0, "", llGetOwner(), ""); } listen(integer channel, string name, key id, string message) { integer itra = BOARD_HEIGHT*BOARD_WIDTH; string pld = ""; do { pld += (string)(itra+1) + "," + llGetSubString(message, itra, itra) + ","; } while(--itra>=0); llWhisper(comChannel, pld); } link_message(integer sender_num, integer num, string str, key id) { if(id != "bcst") return; llWhisper(comChannel, (string)num + "," + str); } on_rez(integer param) { _owner = llGetOwner(); } changed(integer change) { if(change & CHANGED_OWNER) { _owner = llGetOwner(); } }
} </lsl>