This is part one of what will probably be a one part series, but you never know. Anyway, there are some odd tips and tricks around LSL and I’m quickly going to look at one of them. Ok so, here’s the scenario, Unhinged – A festival for Eku’s head, has more goings on in terms of DJ events, than you can shake a stick at. So say I wanted to list some upcoming events I’d maybe have a board with this:
However this is a fast changing list of events and before I know it, my board needs to say this:
Now if I were using textures of course, these boards inworld would look funkier, the thing is I can make them a bit funkier, however I’m not using textures, I’m using llSetPrimMediaParams tricks. This is an imperfect solution but one with potential because I’m using HTML.
However it may be imperfect but for a bit of fun, or a “to hell with it, it’s my party and I’ll write if I want to” type attitude, this has uses. For example, you want to write on one of these boards you’re having a 50% off sale, go for it, only those with the right setup will see it!
Ok here’s the code I used in my second example of the board, hopefully the HTML shows up!
show(string html)
{
html = “data:text/html,” + llEscapeURL(html);
llSetPrimMediaParams(0, // Side to display the media on.
[PRIM_MEDIA_AUTO_PLAY,TRUE, // Show this page immediately
PRIM_MEDIA_CURRENT_URL,html, // The url currently showing
PRIM_MEDIA_HOME_URL,html, // The url if they hit ‘home’
PRIM_MEDIA_HEIGHT_PIXELS,512, // Height/width of media texture will be
PRIM_MEDIA_WIDTH_PIXELS,512]); // rounded up to nearest power of 2.
}
default
{
state_entry()
{
show(“<h1>Friday November 23 at 4pm SLT: DJ Sredni Vashtar is back with a 2 hour set all about Sci-Fi, Robots, Time Lords, and Pizza. Host info as I have it.<p>Friday November 23 at 8pm SLT: Spiral Twin Friday moves to Unhinged, with The Freakkitteh Herself, Ms. Lokii Violet spinning the music</h1>”);
}
}
See, not a long script at all and you don’t even need to upload a texture! However, before you go unleashing this, please read this page first. Take note of the fact that you can change settings with regards to how others interact with your object. As I said, this is not perfect, but it can be fun!
Check out tonight’s sets at Unhinged here.