RSS
 

Posts Tagged ‘secondlife’

Create an Avatar Specific Communication Channel

05 Apr

Sometimes you will want to create a listener that will not interfere with any other avatar using the same object near you. The basic solution of detecting the owner creates a lot of overhead, therefore a better solution is to have individual channels.

Thanks to Winter Seale, on the SecondLife scripters mailing list:

use an avatar specific
channel. To do that I would define a function:

integer get_channel(key avatar, integer offset){
return (integer)("0x"+llGetSubString((string)llGetOwnerKey(),-8,-1))
+ offset
}

Then in your script, use:

llSay( get_channel( llDetectedKey(number), -1234 ), (string)llDetectedKey(number) );
...
llListen( get_channel( llGetOwner(), -1234 ), "", "", "");

* The reason this is better is that it keeps only one script (the
avatar’s) listening on this channel. Without this, a script for every
person with a HUD would have to execute code every time your in world
object was touched.

 
Comments Off

Posted in Uncategorized

 

LSL tests: recursive function

18 Jun

It’s good practice to make code easy to maintain, so sometimes you’ll want to use less code using recursive functions. In order to find out how to this works in Second Life I created this small recusive example:

integer i = 0;
integer top = 0;
integer Monkeys()
{
    llOwnerSay("monkeys");
    i++;
    if (i <= top)
        return Monkeys();
    else
        return i;
}
default
{
    state_entry()
    {
        llSay(0, "Hello, Avatar!");
    }
    touch_start(integer total_number)
    {
        i = 0;
        top = Monkeys();
        llOwnerSay((string)top);
    }
}

This script says monkeys an increasing amount of times every time you touch it by calling itself if and keeping track of the total amount of times the function is called. First time there will be 1 monkey, next time 2 monkeys etc. Find more products at our shop in Badmoon.

 
Comments Off

Posted in Uncategorized

 

LSL tests: walking states

17 Jun

I had to create a simple script to turn a neon sign on and off. I decided to have both versions of the sign in a single texture and changing the offset with a script. Instead of using a timer and using llSetTimeout() instead I opted to pause the script for a small amount of time. The script does not respond when it’s sleeping which should be less laggy then the timeout. All i do then at the start of a state is offsetting the texture to show the on/off alternatively.

default
{
    state_entry()
    {
        llOffsetTexture(0.0,0.25,ALL_SIDES);
        llSleep(1.37);
        state off;
    }
}

state off
{
    state_entry()
    {
        llOffsetTexture(0.0,0.75,ALL_SIDES);
        llSleep(.723);
        state default;
    }
}

Hope this is of use to you. See the result in our Higher / Lower game at Badmoon.

 
Comments Off

Posted in Uncategorized

 

Tracklist @ Drome

02 Feb

Breaks Friday with Cloudseer @ the Drome! It’s my new spot: 3pm-5pm PST! Start off your weekend with the best breaks mixed by live DJ Cloudseer Writer, with a little bit electro thrown in! Bring all your friends to the Drome :D

It was good, managed to cram in a lot of breaks in two hours!

#TitleArtist
1Rattle Ya CageGeneral MIDI
2Bone SnowHELL, Sam
3No Rockstars (Bass Kleph Remix)Hyper
4Loving You (Atomic Hooligan Remix) – IlsIls
5Soul Of Man – Foxy MoronDrummatic Twins
6Rusko v.s. the 80sCrendore
7JahovaRusko
8Shake It Up (Hook n Sling Remix)Stanton Warriors
9Slyde – Vibrate To This (Dt’s Re-Edit)Drummatic Twins
10Tell Me How You Feel (Kid Kenobi vs Rogue Element Remix)Krafty Kuts
11Pop Ya CorkStanton Warriors
12Message 2 Love (Alex Metric remix)Sharam Jey
13Plump Djs – Black JackDrummatic Twins
14Everybody Get Up (Circuit Breaker Remix) – Transformer ManTransformer Man
15Cockney ThugRusko
16Good To GoGeneral MIDI
17Undertow feat. Patrick Scott – Oracle’s Man Overboard MixSummer Channel
18Control (original mix)AUDIO DEALERS
19Rock This PlaceGeneral MIDI
20Drummatic Twins – Feelin Kinda Strange (Bass Kleph & Nick Thayer Remix)Drummatic Twins
21ShredderFar Too Loud
22Da VirusVarious Artists – XL Recordings
23Pop Ya CorkStanton Warriors
24Turn It LoudGeneral MIDI
 
Comments Off

Posted in Uncategorized

 

Purple Rain DJ Event Flyer

19 Jul

As you can see below I created a flyer/poster for an event in Second Life. For those who don’t know, Second life is a virtual world created entirely by its users. Anyone can create an account and log on to build things, meet people for a chat, or dance in a club for example. Or fight in a Star Wars battle as a wookie. Or watch a movie in a cinema. Yep if you can think of it, you can probably do it.

Anyway, on friday night between 1-3pm PDT (Pacific Daylight Time) I have a DJ set in a nightclub called Purple Rain. I play some trip-hop, electro to a small crowd for a few hours. The club has decided to organize a DJ Talent contest and asked me to create a promotional poster. As there was a lot of information to put on and no photos so I decided to play around with positioning, grouping and lighting of text. The result is below. I think it turned out well.

Purple Rain DJ Event Flyer

How do you promote your SL event?

Update: I do not play at Purple Rain anymore. Find me “Cloudseer Writer” online in Second Life.

 
2 Comments

Posted in Uncategorized