Friday, March 12, 2010

March Madness Challenge - Day 12

I've been at the Virtual Worlds Best Practices in Education Conference all day. I've learning all kinds of neat stuff about mixed reality, real reality, virtual reality, and lots of stuff in between. The 3D world in this case is Second Life from the Linden Lab people. They came out with a beta browser and there's lot's of neat potential. The shared media component is really nice. I can create a panel and post to my blog on it now. What I'm really waiting for is the ability to export/import 3D objects to standard 3D tools like Blender. So it would be great to build stuff in or out of Second Life, and then be able to send it to a Makerbot or Mendel for printing.

In the meantime I wrote this script which sends messages from the sender prim to the receiver prim and tells it to fade away the more it is clicked.



The Red Message Sending Box/Prim:

integer chan = -12878;

default
{
state_entry()
{
llOwnerSay( "Sending prim ready");
}

touch_start(integer total_number)
{
llSay(chan, "Hello, this is from RK");
}
}


The Blue Spinny Thing that receives messages from Red Message Box.

float spin_rate = 0.1;
integer chan = -12878;
float alpha = 1.0;

default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
llListen(chan, "", "", "");
llTargetOmega(<1.0,0.0,0.0>,spin_rate,0.2);
}


listen(integer channel, string name, key id, string message)
{
llSay(0,"I heard:"+message);
alpha = alpha - 0.1;
llSetAlpha(alpha,ALL_SIDES);
if (alpha < 0.0)
{
alpha = 1.0;
}
}

}

No comments: