2008年07月31日
2008年07月31日
YouTube、プリロール広告の配信するのか?
YouTubeテレビがSLで普及しつつあります。
SLでのYouTubeの存在価値も高まってきてます。(LivelyでもYouTube見れますが)
GoogleはYouTubeの動画配信がいまだに充分な収益をあげていないと認めてます。
そのため動画を流す前に、また動画を見終わってから広告を流すようにしたいらしい。
でもそれについての反発も大きいみたいで、どうなるか分かりませんが。
広告はうっとうしいけど、YouTubeはずっとサービスを継続してほしいのでやむをえないのかな。
Yahooでもやっているけど、広告があるので見る気が半減するけど。
http://japan.cnet.com/marketing/story/0,3800080523,20376908,00.htm
記事抜粋
Googleは、YouTubeにプリロールおよびポストロール広告を掲載しないとの方針を撤回する準備を整えつつあるようだ。
YouTubeにプリロールおよびポストロール広告を付加することにより、Googleは、広告嫌いのYouTubeの視聴者に対して、より新たな広告手法を提供すると述べてきたが、それに失敗したことを示すものともなる。もっと重大なこととしては、こうした広告が、視聴者からの大反発を招くことにもなりかねない。
http://japan.cnet.com/marketing/story/0,3800080523,20372501,00.htm
YouTubeは実質的な企業収益を生み出すに至っていないということが明らかである。それでも、GoogleがYouTubeを16億5000万ドルで買収してから18カ月がたった現在、同社が「収益を生み出すために一番良い方法を見つけ出す」に至っていないと認めたことは特筆に値する。
SLでのYouTubeの存在価値も高まってきてます。(LivelyでもYouTube見れますが)
GoogleはYouTubeの動画配信がいまだに充分な収益をあげていないと認めてます。
そのため動画を流す前に、また動画を見終わってから広告を流すようにしたいらしい。
でもそれについての反発も大きいみたいで、どうなるか分かりませんが。
広告はうっとうしいけど、YouTubeはずっとサービスを継続してほしいのでやむをえないのかな。
Yahooでもやっているけど、広告があるので見る気が半減するけど。
http://japan.cnet.com/marketing/story/0,3800080523,20376908,00.htm
記事抜粋
Googleは、YouTubeにプリロールおよびポストロール広告を掲載しないとの方針を撤回する準備を整えつつあるようだ。
YouTubeにプリロールおよびポストロール広告を付加することにより、Googleは、広告嫌いのYouTubeの視聴者に対して、より新たな広告手法を提供すると述べてきたが、それに失敗したことを示すものともなる。もっと重大なこととしては、こうした広告が、視聴者からの大反発を招くことにもなりかねない。
http://japan.cnet.com/marketing/story/0,3800080523,20372501,00.htm
YouTubeは実質的な企業収益を生み出すに至っていないということが明らかである。それでも、GoogleがYouTubeを16億5000万ドルで買収してから18カ月がたった現在、同社が「収益を生み出すために一番良い方法を見つけ出す」に至っていないと認めたことは特筆に値する。
Posted by SLドリーマー at
10:33
│Comments(0)
2008年07月30日
画期的! LSLがパズル感覚で作れる③
Scratch for Second Life
http://www.vintfalken.com/scratch-for-second-life-so-even-vint-can-script/
http://web.mit.edu/~eric_r/Public/S4SL/
プリムに衝突すると動きます。
come hereとSayすれば、近寄ります。
jumpとSayすれば、飛び上がります。
roll overとSayすれば、回転します。

自動的に作られたLSL
// The code below was generated by
// SCRATCH FOR SECOND LIFE (S4SL)
// alpha release October 19, 2007
//
// by Eric Rosenbaum (ericr@media.mit.edu)
// MIT Media Lab
// Lifelong Kindergarten group
//
// S4SL is a modified version of Scratch,
// a graphical programming language for kids
// see scratch.mit.edu
//
//
// USER VARIABLES
//
float size_uservar = 0;
//
// INTERNAL VARIABLES
//
vector home;
integer penState;
float penColor;
float color;
float ghost;
vector originalScale;
float sizePercent;
integer numAvatarsNearby;
vector nearestAvPosition;
key ownerKey;
vector ownerPosition;
//
// INTERNAL FUNCTIONS
//
// move(steps)
// move object a number of steps (meters) along its current heading
// forward is along the positive x axis
// if the pen is down, create a line segment along the path traveled
// the line is positioned by its center, which is placed halfway back along the path
move(float steps)
{
vector fwd = llRot2Fwd(llGetRot()) * steps;
llSetPos(llGetPos() + fwd);
if (penState == TRUE) {
if (llGetInventoryType("lineSegment") == INVENTORY_NONE) {
llSay(0, "Oops! To draw a line, my inventory needs a lineSegment. You can get one from the Scratch Inventory Box.");
} else {
integer randomID = llRound(llFrand(99999999));
llRezObject("lineSegment", llGetPos()-fwd/2, <0,0,0>, llGetRot(), randomID);
llSay(1, (string)randomID + ":set length:"+ (string)llFabs(steps));
llSay(1, (string)randomID + ":set color:" + (string)penColor);
}
}
}
// turnRight(float angle)
// turn angle degrees clockwise around the local z axis
turnRight(float angle)
{
angle *= -1;
rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
// turnLeft(float angle)
// turn angle degrees counterclockwise around the local z axis
turnLeft(float angle)
{
rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
//up(float steps)
//move up along the global z axis by steps meters
//does not leave a line segment
up(float steps)
{
llSetPos(llGetPos()+<0,0,steps>);
}
//down(float steps)
//move down along the global z axis by steps meters
//does not leave a line segment
down(float steps)
{
llSetPos(llGetPos()+<0,0,-1*steps>);
}
// turnPitch(float angle)
// turn angle degrees upward around the local y axis
turnPitch(float angle)
{
angle *= -1;
rotation newRot = llEuler2Rot(<0,angle,0> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
// float getHeading()
// return the current heading in the xy plane in degrees
float getHeading() {
return llRot2Angle(llGetRot())*RAD_TO_DEG;
}
// setHeading(float angle)
// set the heading in the xy plane in degrees
setHeading(float angle) {
vector newVec = <0, 0, angle*DEG_TO_RAD>;
rotation newRot = llEuler2Rot(newVec);
llSetRot(newRot);
}
// turnRoll(float angle)
// turn angle degrees clockwise around the local x axis
turnRoll(float angle)
{
rotation newRot = llEuler2Rot( * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
// changePenColorBy(float num)
// change the pen color by an amount
changePenColorBy(float num)
{
penColor += num;
setPenColorTo(penColor);
}
// setPenColorTo(float num)
// set the pen to a particular color
setPenColorTo(float num)
{
penColor = (integer)num % 100;
}
// penDown()
// put the pen down, so that when the object moves it will draw
penDown() {
penState = TRUE;
}
// penUp()
// put the pen up, so that the object will not draw when it moves
penUp() {
penState = FALSE;
}
// clear()
// broadcast a message to nearby line segments that will cause them to
// delete themselves
clear() {
llSay(1, "clearLineSegments");
}
// pointTowardNearestAv()
// turn to point toward the nearest avatar
pointTowardNearestAv()
{
vector myPos = llGetPos();
float xdiff = myPos.x - nearestAvPosition.x;
float ydiff = myPos.y - nearestAvPosition.y;
float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG;
setHeading(270 - angle);
}
// pointTowardOwner()
// turn to point toward the owner
pointTowardOwner()
{
vector myPos = llGetPos();
float xdiff = myPos.x - ownerPosition.x;
float ydiff = myPos.y - ownerPosition.y;
float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG;
setHeading(270 - angle);
}
// float distanceToNearestAv()
// returns the distance in meters to the nearest avatar
float distanceToNearestAv()
{
return llVecDist(llGetPos(), nearestAvPosition);
}
// float distanceToOwner()
// returns the distance in meters to the owner
float distanceToOwner()
{
return llVecDist(llGetPos(), ownerPosition);
}
// float randomMinToMax(float min, float max)
// returns a random number between min and max
integer randomMinToMax(float min, float max)
{
return llRound(llFrand(max - min) + min);
}
// say(string text)
// say the text on the public chat channel 0 so all nearby avatars and objects will hear it
say(string text)
{
llSay(0, text);
}
// broadcast(string message)
// say the message on channel 1. No avatars will hear it.
// all nearby objects will hear it.
broadcast(string message)
{
llSay(1, message);
}
// setText(string text)
// create opaque white floating text above the object
setText(string text)
{
llSetText(text, <1,1,1>, 1);
}
// vector hueToRGB(float h)
// take a color represented as a hue value between 1 and 100 and
// return an RGB vector representing the same color.
vector hueToRGB(float h)
{
integer i;
float f;
float p;
float q;
float t;
float r;
float g;
float b;
float s = 1;
float v = 1;
h *= 5; // sector 0 to 5
i = llFloor(h);
f = h - i; // factorial part of h
p = v * ( 1 - s );
q = v * ( 1 - s * f );
t = v * ( 1 - s * ( 1 - f ) );
if (i == 0) {
r = v;
g = t;
b = p;
} else if (i == 1) {
r = q;
g = v;
b = p;
} else if (i == 2) {
r = p;
g = v;
b = t;
} else if (i == 3) {
r = p;
g = q;
b = v;
} else if (i == 4) {
r = t;
g = p;
b = v;
} else {
r = v;
g = p;
b = q;
}
return;
}
// setColor(float num)
// set the color of the object using a number between 1 and 100 representing a hue
setColor(float num)
{
color = (integer)num % 100;
llSetColor(hueToRGB(color / 100), ALL_SIDES);
if (llGetObjectName() == "Scratch Bug") {
llSetLinkColor(2, hueToRGB(color / 100), ALL_SIDES);
} else {
//llSetLinkColor(LINK_SET, hueToRGB(color / 100), ALL_SIDES);
}
}
// changeColorBy(float num)
// change the hue of the object by a number
changeColorBy(float num)
{
float newColor = color + num;
if (newColor < 0) {
newColor = 0;
}
if (newColor > 100) {
newColor = 100;
}
setColor(newColor);
}
// setGhost(float num)
// set the ghost effect of the object to a value between 0 (opaque) and 100 (transparent)
setGhost(float num)
{
ghost = (integer)num % 101;
llSetAlpha(((100 - ghost) / 100), ALL_SIDES);
llSetLinkAlpha(LINK_SET, ((100 - ghost) / 100), ALL_SIDES);
}
// changeGhostBy(float num)
// change the ghost effect on an object by a number
changeGhostBy(float num)
{
setGhost(ghost + num);
}
// setSize(float newSize)
// set the size of the object to a percentage of its original size
setSize(float newSize)
{
sizePercent = newSize;
vector newScale = originalScale*(sizePercent/100);
llSetScale(newScale);
}
// changeSizeBy(float change)
// change the size of an object by a percentage of its original size
changeSizeBy(float change)
{
sizePercent += change;
vector newScale = originalScale*(sizePercent/100);
llSetScale(newScale);
}
// playSound(string snd)
// play a sound at full volume
// snd can be the name of a sound in the inventory of the object, or the
// UUID of a sound which exists somewhere else
playSound(string snd)
{
llPlaySound(snd, 1);
}
// playSoundNamed(string snd)
// play a sound at full volume
// snd can be the name of a sound in the inventory of the object, or the
// UUID of a sound which exists somewhere else
// this is the version for text input of the name of a sound in a scratch block
// so it checks the inventory and gives an error if the sound is missing
playSoundNamed(string snd)
{
if (llGetInventoryType(snd) == INVENTORY_NONE) {
llSay(0, "Oops! My inventory does not contain the sound " + snd);
} else {
llPlaySound(snd, 1);
}
}
// wait(float secs)
// pause all execution of this script for some number of seconds
wait(float secs)
{
llSleep(secs);
}
// levelOut()
// remove the x and y rotation components, so that the object is
// level with respect to the ground
levelOut()
{
vector myVec = llRot2Euler(llGetRot());
vector newVec = <0, 0, myVec.z>;
rotation newRot = llEuler2Rot(newVec);
llSetRot(newRot);
}
// goHome()
// move the object back to its home position
// home is set the the position of the object when it is created,
// and can be set to a new position using setHomeHere()
goHome()
{
llSetPos(home);
//levelOut();
}
// setHomeHere()
// set the home position to the current position
setHomeHere()
{
home = llGetPos();
}
// startListening()
// listen for messages on both channel 0, the public channel,
// and channel 1, where broadcasts are sent
startListening()
{
llListen(0, "", "", "");
llListen(1, "", "", "");
}
// initInternal()
// do some setup for internal functions
// this includes setting various variables to their defaults
// clearing text on the object, and turning on
// the repeating sensor and timer events
initInternal()
{
setHomeHere();
penState = FALSE;
penColor = 0;
color = 0;
ghost = 0;
sizePercent = 100;
originalScale = llGetScale();
ownerKey = llGetOwner();
llSetText("", <1,1,1>, 0);
llSensorRepeat("", "", AGENT, 96, PI, .1);
llSetTimerEvent(.1);
startListening();
}
initAll() {
initInternal();
}
listen1(string msg){
if (msg == "come here") {
pointTowardOwner();
move((distanceToOwner() - 2));
}
}
listen2(string msg){
if (msg == "jump") {
up(1);
wait(0.2);
down(1);
}
}
listen3(string msg){
if (msg == "spiral") {
penDown();
setHomeHere();
size_uservar = 1;
integer i1;
for (i1=0; i1<30;i1++) {
move(size_uservar);
turnRight(40);
size_uservar += -0.02;
changePenColorBy(1);
turnPitch(3);
turnRoll(-3);
}
goHome();
penUp();
}
}
listen4(string msg){
if (msg == "clear") {
clear();
goHome();
}
}
listen5(string msg){
if (msg == "roll over") {
integer i2;
for (i2=0; i2<4;i2++) {
turnRoll(90);
}
}
}
listen6(string msg){
if (msg == "draw some stairs") {
setPenColorTo(0);
size_uservar = 3;
penDown();
integer i3;
for (i3=0; i3<10;i3++) {
integer i4;
for (i4=0; i4<4;i4++) {
turnRight(90);
move(size_uservar);
}
up(0.2);
size_uservar += -0.2;
changePenColorBy(3);
}
penUp();
}
}
collision1(){
playSound("5d295a57-5f21-9100-a4a5-e6648818d645");
pointTowardNearestAv();
move(-1);
}
default
{
state_entry()
{
initAll();
}
on_rez(integer start_param)
{
initAll();
}
sensor(integer n)
{
numAvatarsNearby = n;
nearestAvPosition = llDetectedPos(0);
integer i;
for (i=0; i
if (llDetectedKey(i) == ownerKey) {
ownerPosition = llDetectedPos(i);
}
}
}
touch_start(integer n) {
}
collision_start(integer n) {
collision1();
}
listen(integer channel, string name, key id, string msg) {
listen1(msg);
listen2(msg);
listen3(msg);
listen4(msg);
listen5(msg);
listen6(msg);
}
timer() {
}
}
//2
//1 0.2 1
//1 30 40 -0.02 1 3 -3
//
//4 90
//0 3 10 4 90 0.2 -0.2 3
//clang -1
http://www.vintfalken.com/scratch-for-second-life-so-even-vint-can-script/
http://web.mit.edu/~eric_r/Public/S4SL/
プリムに衝突すると動きます。
come hereとSayすれば、近寄ります。
jumpとSayすれば、飛び上がります。
roll overとSayすれば、回転します。
自動的に作られたLSL
// The code below was generated by
// SCRATCH FOR SECOND LIFE (S4SL)
// alpha release October 19, 2007
//
// by Eric Rosenbaum (ericr@media.mit.edu)
// MIT Media Lab
// Lifelong Kindergarten group
//
// S4SL is a modified version of Scratch,
// a graphical programming language for kids
// see scratch.mit.edu
//
//
// USER VARIABLES
//
float size_uservar = 0;
//
// INTERNAL VARIABLES
//
vector home;
integer penState;
float penColor;
float color;
float ghost;
vector originalScale;
float sizePercent;
integer numAvatarsNearby;
vector nearestAvPosition;
key ownerKey;
vector ownerPosition;
//
// INTERNAL FUNCTIONS
//
// move(steps)
// move object a number of steps (meters) along its current heading
// forward is along the positive x axis
// if the pen is down, create a line segment along the path traveled
// the line is positioned by its center, which is placed halfway back along the path
move(float steps)
{
vector fwd = llRot2Fwd(llGetRot()) * steps;
llSetPos(llGetPos() + fwd);
if (penState == TRUE) {
if (llGetInventoryType("lineSegment") == INVENTORY_NONE) {
llSay(0, "Oops! To draw a line, my inventory needs a lineSegment. You can get one from the Scratch Inventory Box.");
} else {
integer randomID = llRound(llFrand(99999999));
llRezObject("lineSegment", llGetPos()-fwd/2, <0,0,0>, llGetRot(), randomID);
llSay(1, (string)randomID + ":set length:"+ (string)llFabs(steps));
llSay(1, (string)randomID + ":set color:" + (string)penColor);
}
}
}
// turnRight(float angle)
// turn angle degrees clockwise around the local z axis
turnRight(float angle)
{
angle *= -1;
rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
// turnLeft(float angle)
// turn angle degrees counterclockwise around the local z axis
turnLeft(float angle)
{
rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
//up(float steps)
//move up along the global z axis by steps meters
//does not leave a line segment
up(float steps)
{
llSetPos(llGetPos()+<0,0,steps>);
}
//down(float steps)
//move down along the global z axis by steps meters
//does not leave a line segment
down(float steps)
{
llSetPos(llGetPos()+<0,0,-1*steps>);
}
// turnPitch(float angle)
// turn angle degrees upward around the local y axis
turnPitch(float angle)
{
angle *= -1;
rotation newRot = llEuler2Rot(<0,angle,0> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
// float getHeading()
// return the current heading in the xy plane in degrees
float getHeading() {
return llRot2Angle(llGetRot())*RAD_TO_DEG;
}
// setHeading(float angle)
// set the heading in the xy plane in degrees
setHeading(float angle) {
vector newVec = <0, 0, angle*DEG_TO_RAD>;
rotation newRot = llEuler2Rot(newVec);
llSetRot(newRot);
}
// turnRoll(float angle)
// turn angle degrees clockwise around the local x axis
turnRoll(float angle)
{
rotation newRot = llEuler2Rot(
llSetRot(newRot*llGetRot());
}
// changePenColorBy(float num)
// change the pen color by an amount
changePenColorBy(float num)
{
penColor += num;
setPenColorTo(penColor);
}
// setPenColorTo(float num)
// set the pen to a particular color
setPenColorTo(float num)
{
penColor = (integer)num % 100;
}
// penDown()
// put the pen down, so that when the object moves it will draw
penDown() {
penState = TRUE;
}
// penUp()
// put the pen up, so that the object will not draw when it moves
penUp() {
penState = FALSE;
}
// clear()
// broadcast a message to nearby line segments that will cause them to
// delete themselves
clear() {
llSay(1, "clearLineSegments");
}
// pointTowardNearestAv()
// turn to point toward the nearest avatar
pointTowardNearestAv()
{
vector myPos = llGetPos();
float xdiff = myPos.x - nearestAvPosition.x;
float ydiff = myPos.y - nearestAvPosition.y;
float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG;
setHeading(270 - angle);
}
// pointTowardOwner()
// turn to point toward the owner
pointTowardOwner()
{
vector myPos = llGetPos();
float xdiff = myPos.x - ownerPosition.x;
float ydiff = myPos.y - ownerPosition.y;
float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG;
setHeading(270 - angle);
}
// float distanceToNearestAv()
// returns the distance in meters to the nearest avatar
float distanceToNearestAv()
{
return llVecDist(llGetPos(), nearestAvPosition);
}
// float distanceToOwner()
// returns the distance in meters to the owner
float distanceToOwner()
{
return llVecDist(llGetPos(), ownerPosition);
}
// float randomMinToMax(float min, float max)
// returns a random number between min and max
integer randomMinToMax(float min, float max)
{
return llRound(llFrand(max - min) + min);
}
// say(string text)
// say the text on the public chat channel 0 so all nearby avatars and objects will hear it
say(string text)
{
llSay(0, text);
}
// broadcast(string message)
// say the message on channel 1. No avatars will hear it.
// all nearby objects will hear it.
broadcast(string message)
{
llSay(1, message);
}
// setText(string text)
// create opaque white floating text above the object
setText(string text)
{
llSetText(text, <1,1,1>, 1);
}
// vector hueToRGB(float h)
// take a color represented as a hue value between 1 and 100 and
// return an RGB vector representing the same color.
vector hueToRGB(float h)
{
integer i;
float f;
float p;
float q;
float t;
float r;
float g;
float b;
float s = 1;
float v = 1;
h *= 5; // sector 0 to 5
i = llFloor(h);
f = h - i; // factorial part of h
p = v * ( 1 - s );
q = v * ( 1 - s * f );
t = v * ( 1 - s * ( 1 - f ) );
if (i == 0) {
r = v;
g = t;
b = p;
} else if (i == 1) {
r = q;
g = v;
b = p;
} else if (i == 2) {
r = p;
g = v;
b = t;
} else if (i == 3) {
r = p;
g = q;
b = v;
} else if (i == 4) {
r = t;
g = p;
b = v;
} else {
r = v;
g = p;
b = q;
}
return
}
// setColor(float num)
// set the color of the object using a number between 1 and 100 representing a hue
setColor(float num)
{
color = (integer)num % 100;
llSetColor(hueToRGB(color / 100), ALL_SIDES);
if (llGetObjectName() == "Scratch Bug") {
llSetLinkColor(2, hueToRGB(color / 100), ALL_SIDES);
} else {
//llSetLinkColor(LINK_SET, hueToRGB(color / 100), ALL_SIDES);
}
}
// changeColorBy(float num)
// change the hue of the object by a number
changeColorBy(float num)
{
float newColor = color + num;
if (newColor < 0) {
newColor = 0;
}
if (newColor > 100) {
newColor = 100;
}
setColor(newColor);
}
// setGhost(float num)
// set the ghost effect of the object to a value between 0 (opaque) and 100 (transparent)
setGhost(float num)
{
ghost = (integer)num % 101;
llSetAlpha(((100 - ghost) / 100), ALL_SIDES);
llSetLinkAlpha(LINK_SET, ((100 - ghost) / 100), ALL_SIDES);
}
// changeGhostBy(float num)
// change the ghost effect on an object by a number
changeGhostBy(float num)
{
setGhost(ghost + num);
}
// setSize(float newSize)
// set the size of the object to a percentage of its original size
setSize(float newSize)
{
sizePercent = newSize;
vector newScale = originalScale*(sizePercent/100);
llSetScale(newScale);
}
// changeSizeBy(float change)
// change the size of an object by a percentage of its original size
changeSizeBy(float change)
{
sizePercent += change;
vector newScale = originalScale*(sizePercent/100);
llSetScale(newScale);
}
// playSound(string snd)
// play a sound at full volume
// snd can be the name of a sound in the inventory of the object, or the
// UUID of a sound which exists somewhere else
playSound(string snd)
{
llPlaySound(snd, 1);
}
// playSoundNamed(string snd)
// play a sound at full volume
// snd can be the name of a sound in the inventory of the object, or the
// UUID of a sound which exists somewhere else
// this is the version for text input of the name of a sound in a scratch block
// so it checks the inventory and gives an error if the sound is missing
playSoundNamed(string snd)
{
if (llGetInventoryType(snd) == INVENTORY_NONE) {
llSay(0, "Oops! My inventory does not contain the sound " + snd);
} else {
llPlaySound(snd, 1);
}
}
// wait(float secs)
// pause all execution of this script for some number of seconds
wait(float secs)
{
llSleep(secs);
}
// levelOut()
// remove the x and y rotation components, so that the object is
// level with respect to the ground
levelOut()
{
vector myVec = llRot2Euler(llGetRot());
vector newVec = <0, 0, myVec.z>;
rotation newRot = llEuler2Rot(newVec);
llSetRot(newRot);
}
// goHome()
// move the object back to its home position
// home is set the the position of the object when it is created,
// and can be set to a new position using setHomeHere()
goHome()
{
llSetPos(home);
//levelOut();
}
// setHomeHere()
// set the home position to the current position
setHomeHere()
{
home = llGetPos();
}
// startListening()
// listen for messages on both channel 0, the public channel,
// and channel 1, where broadcasts are sent
startListening()
{
llListen(0, "", "", "");
llListen(1, "", "", "");
}
// initInternal()
// do some setup for internal functions
// this includes setting various variables to their defaults
// clearing text on the object, and turning on
// the repeating sensor and timer events
initInternal()
{
setHomeHere();
penState = FALSE;
penColor = 0;
color = 0;
ghost = 0;
sizePercent = 100;
originalScale = llGetScale();
ownerKey = llGetOwner();
llSetText("", <1,1,1>, 0);
llSensorRepeat("", "", AGENT, 96, PI, .1);
llSetTimerEvent(.1);
startListening();
}
initAll() {
initInternal();
}
listen1(string msg){
if (msg == "come here") {
pointTowardOwner();
move((distanceToOwner() - 2));
}
}
listen2(string msg){
if (msg == "jump") {
up(1);
wait(0.2);
down(1);
}
}
listen3(string msg){
if (msg == "spiral") {
penDown();
setHomeHere();
size_uservar = 1;
integer i1;
for (i1=0; i1<30;i1++) {
move(size_uservar);
turnRight(40);
size_uservar += -0.02;
changePenColorBy(1);
turnPitch(3);
turnRoll(-3);
}
goHome();
penUp();
}
}
listen4(string msg){
if (msg == "clear") {
clear();
goHome();
}
}
listen5(string msg){
if (msg == "roll over") {
integer i2;
for (i2=0; i2<4;i2++) {
turnRoll(90);
}
}
}
listen6(string msg){
if (msg == "draw some stairs") {
setPenColorTo(0);
size_uservar = 3;
penDown();
integer i3;
for (i3=0; i3<10;i3++) {
integer i4;
for (i4=0; i4<4;i4++) {
turnRight(90);
move(size_uservar);
}
up(0.2);
size_uservar += -0.2;
changePenColorBy(3);
}
penUp();
}
}
collision1(){
playSound("5d295a57-5f21-9100-a4a5-e6648818d645");
pointTowardNearestAv();
move(-1);
}
default
{
state_entry()
{
initAll();
}
on_rez(integer start_param)
{
initAll();
}
sensor(integer n)
{
numAvatarsNearby = n;
nearestAvPosition = llDetectedPos(0);
integer i;
for (i=0; i
ownerPosition = llDetectedPos(i);
}
}
}
touch_start(integer n) {
}
collision_start(integer n) {
collision1();
}
listen(integer channel, string name, key id, string msg) {
listen1(msg);
listen2(msg);
listen3(msg);
listen4(msg);
listen5(msg);
listen6(msg);
}
timer() {
}
}
//
//
//
//
//
//
//
2008年07月29日
画期的! LSLがパズル感覚で作れる②
Scratch for Second Life
http://web.mit.edu/~eric_r/Public/S4SL/
サンプルプログラムを実験。
なお私が作ったのではありません。
このLSLの特徴は
アバターを追いかけます。(離れると5mまで近寄ってきます。)
プリムをタッチするとHOPします。
プリムにぶつかるとSorryとsayします。
パズルを組み合わせる。

上のようにパズルを組み合わせると下記のLSLが自動的に作成されます。
// The code below was generated by
// SCRATCH FOR SECOND LIFE (S4SL)
// alpha release October 19, 2007
//
// by Eric Rosenbaum (ericr@media.mit.edu)
// MIT Media Lab
// Lifelong Kindergarten group
//
// S4SL is a modified version of Scratch,
// a graphical programming language for kids
// see scratch.mit.edu
//
//
// USER VARIABLES
//
//
// INTERNAL VARIABLES
//
vector home;
integer penState;
float penColor;
float color;
float ghost;
vector originalScale;
float sizePercent;
integer numAvatarsNearby;
vector nearestAvPosition;
key ownerKey;
vector ownerPosition;
//
// INTERNAL FUNCTIONS
//
// move(steps)
// move object a number of steps (meters) along its current heading
// forward is along the positive x axis
// if the pen is down, create a line segment along the path traveled
// the line is positioned by its center, which is placed halfway back along the path
move(float steps)
{
vector fwd = llRot2Fwd(llGetRot()) * steps;
llSetPos(llGetPos() + fwd);
if (penState == TRUE) {
if (llGetInventoryType("lineSegment") == INVENTORY_NONE) {
llSay(0, "Oops! To draw a line, my inventory needs a lineSegment. You can get one from the Scratch Inventory Box.");
} else {
integer randomID = llRound(llFrand(99999999));
llRezObject("lineSegment", llGetPos()-fwd/2, <0,0,0>, llGetRot(), randomID);
llSay(1, (string)randomID + ":set length:"+ (string)llFabs(steps));
llSay(1, (string)randomID + ":set color:" + (string)penColor);
}
}
}
// turnRight(float angle)
// turn angle degrees clockwise around the local z axis
turnRight(float angle)
{
angle *= -1;
rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
// turnLeft(float angle)
// turn angle degrees counterclockwise around the local z axis
turnLeft(float angle)
{
rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
//up(float steps)
//move up along the global z axis by steps meters
//does not leave a line segment
up(float steps)
{
llSetPos(llGetPos()+<0,0,steps>);
}
//down(float steps)
//move down along the global z axis by steps meters
//does not leave a line segment
down(float steps)
{
llSetPos(llGetPos()+<0,0,-1*steps>);
}
// turnPitch(float angle)
// turn angle degrees upward around the local y axis
turnPitch(float angle)
{
angle *= -1;
rotation newRot = llEuler2Rot(<0,angle,0> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
// float getHeading()
// return the current heading in the xy plane in degrees
float getHeading() {
return llRot2Angle(llGetRot())*RAD_TO_DEG;
}
// setHeading(float angle)
// set the heading in the xy plane in degrees
setHeading(float angle) {
vector newVec = <0, 0, angle*DEG_TO_RAD>;
rotation newRot = llEuler2Rot(newVec);
llSetRot(newRot);
}
// turnRoll(float angle)
// turn angle degrees clockwise around the local x axis
turnRoll(float angle)
{
rotation newRot = llEuler2Rot( * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
// changePenColorBy(float num)
// change the pen color by an amount
changePenColorBy(float num)
{
penColor += num;
setPenColorTo(penColor);
}
// setPenColorTo(float num)
// set the pen to a particular color
setPenColorTo(float num)
{
penColor = (integer)num % 100;
}
// penDown()
// put the pen down, so that when the object moves it will draw
penDown() {
penState = TRUE;
}
// penUp()
// put the pen up, so that the object will not draw when it moves
penUp() {
penState = FALSE;
}
// clear()
// broadcast a message to nearby line segments that will cause them to
// delete themselves
clear() {
llSay(1, "clearLineSegments");
}
// pointTowardNearestAv()
// turn to point toward the nearest avatar
pointTowardNearestAv()
{
vector myPos = llGetPos();
float xdiff = myPos.x - nearestAvPosition.x;
float ydiff = myPos.y - nearestAvPosition.y;
float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG;
setHeading(270 - angle);
}
// pointTowardOwner()
// turn to point toward the owner
pointTowardOwner()
{
vector myPos = llGetPos();
float xdiff = myPos.x - ownerPosition.x;
float ydiff = myPos.y - ownerPosition.y;
float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG;
setHeading(270 - angle);
}
// float distanceToNearestAv()
// returns the distance in meters to the nearest avatar
float distanceToNearestAv()
{
return llVecDist(llGetPos(), nearestAvPosition);
}
// float distanceToOwner()
// returns the distance in meters to the owner
float distanceToOwner()
{
return llVecDist(llGetPos(), ownerPosition);
}
// float randomMinToMax(float min, float max)
// returns a random number between min and max
integer randomMinToMax(float min, float max)
{
return llRound(llFrand(max - min) + min);
}
// say(string text)
// say the text on the public chat channel 0 so all nearby avatars and objects will hear it
say(string text)
{
llSay(0, text);
}
// broadcast(string message)
// say the message on channel 1. No avatars will hear it.
// all nearby objects will hear it.
broadcast(string message)
{
llSay(1, message);
}
// setText(string text)
// create opaque white floating text above the object
setText(string text)
{
llSetText(text, <1,1,1>, 1);
}
// vector hueToRGB(float h)
// take a color represented as a hue value between 1 and 100 and
// return an RGB vector representing the same color.
vector hueToRGB(float h)
{
integer i;
float f;
float p;
float q;
float t;
float r;
float g;
float b;
float s = 1;
float v = 1;
h *= 5; // sector 0 to 5
i = llFloor(h);
f = h - i; // factorial part of h
p = v * ( 1 - s );
q = v * ( 1 - s * f );
t = v * ( 1 - s * ( 1 - f ) );
if (i == 0) {
r = v;
g = t;
b = p;
} else if (i == 1) {
r = q;
g = v;
b = p;
} else if (i == 2) {
r = p;
g = v;
b = t;
} else if (i == 3) {
r = p;
g = q;
b = v;
} else if (i == 4) {
r = t;
g = p;
b = v;
} else {
r = v;
g = p;
b = q;
}
return;
}
// setColor(float num)
// set the color of the object using a number between 1 and 100 representing a hue
setColor(float num)
{
color = (integer)num % 100;
llSetColor(hueToRGB(color / 100), ALL_SIDES);
if (llGetObjectName() == "Scratch Bug") {
llSetLinkColor(2, hueToRGB(color / 100), ALL_SIDES);
} else {
//llSetLinkColor(LINK_SET, hueToRGB(color / 100), ALL_SIDES);
}
}
// changeColorBy(float num)
// change the hue of the object by a number
changeColorBy(float num)
{
float newColor = color + num;
if (newColor < 0) {
newColor = 0;
}
if (newColor > 100) {
newColor = 100;
}
setColor(newColor);
}
// setGhost(float num)
// set the ghost effect of the object to a value between 0 (opaque) and 100 (transparent)
setGhost(float num)
{
ghost = (integer)num % 101;
llSetAlpha(((100 - ghost) / 100), ALL_SIDES);
llSetLinkAlpha(LINK_SET, ((100 - ghost) / 100), ALL_SIDES);
}
// changeGhostBy(float num)
// change the ghost effect on an object by a number
changeGhostBy(float num)
{
setGhost(ghost + num);
}
// setSize(float newSize)
// set the size of the object to a percentage of its original size
setSize(float newSize)
{
sizePercent = newSize;
vector newScale = originalScale*(sizePercent/100);
llSetScale(newScale);
}
// changeSizeBy(float change)
// change the size of an object by a percentage of its original size
changeSizeBy(float change)
{
sizePercent += change;
vector newScale = originalScale*(sizePercent/100);
llSetScale(newScale);
}
// playSound(string snd)
// play a sound at full volume
// snd can be the name of a sound in the inventory of the object, or the
// UUID of a sound which exists somewhere else
playSound(string snd)
{
llPlaySound(snd, 1);
}
// playSoundNamed(string snd)
// play a sound at full volume
// snd can be the name of a sound in the inventory of the object, or the
// UUID of a sound which exists somewhere else
// this is the version for text input of the name of a sound in a scratch block
// so it checks the inventory and gives an error if the sound is missing
playSoundNamed(string snd)
{
if (llGetInventoryType(snd) == INVENTORY_NONE) {
llSay(0, "Oops! My inventory does not contain the sound " + snd);
} else {
llPlaySound(snd, 1);
}
}
// wait(float secs)
// pause all execution of this script for some number of seconds
wait(float secs)
{
llSleep(secs);
}
// levelOut()
// remove the x and y rotation components, so that the object is
// level with respect to the ground
levelOut()
{
vector myVec = llRot2Euler(llGetRot());
vector newVec = <0, 0, myVec.z>;
rotation newRot = llEuler2Rot(newVec);
llSetRot(newRot);
}
// goHome()
// move the object back to its home position
// home is set the the position of the object when it is created,
// and can be set to a new position using setHomeHere()
goHome()
{
llSetPos(home);
//levelOut();
}
// setHomeHere()
// set the home position to the current position
setHomeHere()
{
home = llGetPos();
}
// startListening()
// listen for messages on both channel 0, the public channel,
// and channel 1, where broadcasts are sent
startListening()
{
llListen(0, "", "", "");
llListen(1, "", "", "");
}
// initInternal()
// do some setup for internal functions
// this includes setting various variables to their defaults
// clearing text on the object, and turning on
// the repeating sensor and timer events
initInternal()
{
setHomeHere();
penState = FALSE;
penColor = 0;
color = 0;
ghost = 0;
sizePercent = 100;
originalScale = llGetScale();
ownerKey = llGetOwner();
llSetText("", <1,1,1>, 0);
llSensorRepeat("", "", AGENT, 96, PI, .1);
llSetTimerEvent(.1);
startListening();
}
initAll() {
initInternal();
}
timer1(){
if ((distanceToOwner() > 5)) {
pointTowardOwner();
up(1);
move(1);
down(1);
}
}
collision1(){
say("sorry");
}
touch1(){
pointTowardOwner();
up(1);
move(1);
say("hop");
down(1);
}
default
{
state_entry()
{
initAll();
}
on_rez(integer start_param)
{
initAll();
}
sensor(integer n)
{
numAvatarsNearby = n;
nearestAvPosition = llDetectedPos(0);
integer i;
for (i=0; i
if (llDetectedKey(i) == ownerKey) {
ownerPosition = llDetectedPos(i);
}
}
}
touch_start(integer n) {
touch1();
}
collision_start(integer n) {
collision1();
}
listen(integer channel, string name, key id, string msg) {
}
timer() {
timer1();
}
}
//5 1 1 1
//sorry
//1 1 hop 1
http://web.mit.edu/~eric_r/Public/S4SL/
サンプルプログラムを実験。
なお私が作ったのではありません。
このLSLの特徴は
アバターを追いかけます。(離れると5mまで近寄ってきます。)
プリムをタッチするとHOPします。
プリムにぶつかるとSorryとsayします。
パズルを組み合わせる。
上のようにパズルを組み合わせると下記のLSLが自動的に作成されます。
// The code below was generated by
// SCRATCH FOR SECOND LIFE (S4SL)
// alpha release October 19, 2007
//
// by Eric Rosenbaum (ericr@media.mit.edu)
// MIT Media Lab
// Lifelong Kindergarten group
//
// S4SL is a modified version of Scratch,
// a graphical programming language for kids
// see scratch.mit.edu
//
//
// USER VARIABLES
//
//
// INTERNAL VARIABLES
//
vector home;
integer penState;
float penColor;
float color;
float ghost;
vector originalScale;
float sizePercent;
integer numAvatarsNearby;
vector nearestAvPosition;
key ownerKey;
vector ownerPosition;
//
// INTERNAL FUNCTIONS
//
// move(steps)
// move object a number of steps (meters) along its current heading
// forward is along the positive x axis
// if the pen is down, create a line segment along the path traveled
// the line is positioned by its center, which is placed halfway back along the path
move(float steps)
{
vector fwd = llRot2Fwd(llGetRot()) * steps;
llSetPos(llGetPos() + fwd);
if (penState == TRUE) {
if (llGetInventoryType("lineSegment") == INVENTORY_NONE) {
llSay(0, "Oops! To draw a line, my inventory needs a lineSegment. You can get one from the Scratch Inventory Box.");
} else {
integer randomID = llRound(llFrand(99999999));
llRezObject("lineSegment", llGetPos()-fwd/2, <0,0,0>, llGetRot(), randomID);
llSay(1, (string)randomID + ":set length:"+ (string)llFabs(steps));
llSay(1, (string)randomID + ":set color:" + (string)penColor);
}
}
}
// turnRight(float angle)
// turn angle degrees clockwise around the local z axis
turnRight(float angle)
{
angle *= -1;
rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
// turnLeft(float angle)
// turn angle degrees counterclockwise around the local z axis
turnLeft(float angle)
{
rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
//up(float steps)
//move up along the global z axis by steps meters
//does not leave a line segment
up(float steps)
{
llSetPos(llGetPos()+<0,0,steps>);
}
//down(float steps)
//move down along the global z axis by steps meters
//does not leave a line segment
down(float steps)
{
llSetPos(llGetPos()+<0,0,-1*steps>);
}
// turnPitch(float angle)
// turn angle degrees upward around the local y axis
turnPitch(float angle)
{
angle *= -1;
rotation newRot = llEuler2Rot(<0,angle,0> * DEG_TO_RAD);
llSetRot(newRot*llGetRot());
}
// float getHeading()
// return the current heading in the xy plane in degrees
float getHeading() {
return llRot2Angle(llGetRot())*RAD_TO_DEG;
}
// setHeading(float angle)
// set the heading in the xy plane in degrees
setHeading(float angle) {
vector newVec = <0, 0, angle*DEG_TO_RAD>;
rotation newRot = llEuler2Rot(newVec);
llSetRot(newRot);
}
// turnRoll(float angle)
// turn angle degrees clockwise around the local x axis
turnRoll(float angle)
{
rotation newRot = llEuler2Rot(
llSetRot(newRot*llGetRot());
}
// changePenColorBy(float num)
// change the pen color by an amount
changePenColorBy(float num)
{
penColor += num;
setPenColorTo(penColor);
}
// setPenColorTo(float num)
// set the pen to a particular color
setPenColorTo(float num)
{
penColor = (integer)num % 100;
}
// penDown()
// put the pen down, so that when the object moves it will draw
penDown() {
penState = TRUE;
}
// penUp()
// put the pen up, so that the object will not draw when it moves
penUp() {
penState = FALSE;
}
// clear()
// broadcast a message to nearby line segments that will cause them to
// delete themselves
clear() {
llSay(1, "clearLineSegments");
}
// pointTowardNearestAv()
// turn to point toward the nearest avatar
pointTowardNearestAv()
{
vector myPos = llGetPos();
float xdiff = myPos.x - nearestAvPosition.x;
float ydiff = myPos.y - nearestAvPosition.y;
float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG;
setHeading(270 - angle);
}
// pointTowardOwner()
// turn to point toward the owner
pointTowardOwner()
{
vector myPos = llGetPos();
float xdiff = myPos.x - ownerPosition.x;
float ydiff = myPos.y - ownerPosition.y;
float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG;
setHeading(270 - angle);
}
// float distanceToNearestAv()
// returns the distance in meters to the nearest avatar
float distanceToNearestAv()
{
return llVecDist(llGetPos(), nearestAvPosition);
}
// float distanceToOwner()
// returns the distance in meters to the owner
float distanceToOwner()
{
return llVecDist(llGetPos(), ownerPosition);
}
// float randomMinToMax(float min, float max)
// returns a random number between min and max
integer randomMinToMax(float min, float max)
{
return llRound(llFrand(max - min) + min);
}
// say(string text)
// say the text on the public chat channel 0 so all nearby avatars and objects will hear it
say(string text)
{
llSay(0, text);
}
// broadcast(string message)
// say the message on channel 1. No avatars will hear it.
// all nearby objects will hear it.
broadcast(string message)
{
llSay(1, message);
}
// setText(string text)
// create opaque white floating text above the object
setText(string text)
{
llSetText(text, <1,1,1>, 1);
}
// vector hueToRGB(float h)
// take a color represented as a hue value between 1 and 100 and
// return an RGB vector representing the same color.
vector hueToRGB(float h)
{
integer i;
float f;
float p;
float q;
float t;
float r;
float g;
float b;
float s = 1;
float v = 1;
h *= 5; // sector 0 to 5
i = llFloor(h);
f = h - i; // factorial part of h
p = v * ( 1 - s );
q = v * ( 1 - s * f );
t = v * ( 1 - s * ( 1 - f ) );
if (i == 0) {
r = v;
g = t;
b = p;
} else if (i == 1) {
r = q;
g = v;
b = p;
} else if (i == 2) {
r = p;
g = v;
b = t;
} else if (i == 3) {
r = p;
g = q;
b = v;
} else if (i == 4) {
r = t;
g = p;
b = v;
} else {
r = v;
g = p;
b = q;
}
return
}
// setColor(float num)
// set the color of the object using a number between 1 and 100 representing a hue
setColor(float num)
{
color = (integer)num % 100;
llSetColor(hueToRGB(color / 100), ALL_SIDES);
if (llGetObjectName() == "Scratch Bug") {
llSetLinkColor(2, hueToRGB(color / 100), ALL_SIDES);
} else {
//llSetLinkColor(LINK_SET, hueToRGB(color / 100), ALL_SIDES);
}
}
// changeColorBy(float num)
// change the hue of the object by a number
changeColorBy(float num)
{
float newColor = color + num;
if (newColor < 0) {
newColor = 0;
}
if (newColor > 100) {
newColor = 100;
}
setColor(newColor);
}
// setGhost(float num)
// set the ghost effect of the object to a value between 0 (opaque) and 100 (transparent)
setGhost(float num)
{
ghost = (integer)num % 101;
llSetAlpha(((100 - ghost) / 100), ALL_SIDES);
llSetLinkAlpha(LINK_SET, ((100 - ghost) / 100), ALL_SIDES);
}
// changeGhostBy(float num)
// change the ghost effect on an object by a number
changeGhostBy(float num)
{
setGhost(ghost + num);
}
// setSize(float newSize)
// set the size of the object to a percentage of its original size
setSize(float newSize)
{
sizePercent = newSize;
vector newScale = originalScale*(sizePercent/100);
llSetScale(newScale);
}
// changeSizeBy(float change)
// change the size of an object by a percentage of its original size
changeSizeBy(float change)
{
sizePercent += change;
vector newScale = originalScale*(sizePercent/100);
llSetScale(newScale);
}
// playSound(string snd)
// play a sound at full volume
// snd can be the name of a sound in the inventory of the object, or the
// UUID of a sound which exists somewhere else
playSound(string snd)
{
llPlaySound(snd, 1);
}
// playSoundNamed(string snd)
// play a sound at full volume
// snd can be the name of a sound in the inventory of the object, or the
// UUID of a sound which exists somewhere else
// this is the version for text input of the name of a sound in a scratch block
// so it checks the inventory and gives an error if the sound is missing
playSoundNamed(string snd)
{
if (llGetInventoryType(snd) == INVENTORY_NONE) {
llSay(0, "Oops! My inventory does not contain the sound " + snd);
} else {
llPlaySound(snd, 1);
}
}
// wait(float secs)
// pause all execution of this script for some number of seconds
wait(float secs)
{
llSleep(secs);
}
// levelOut()
// remove the x and y rotation components, so that the object is
// level with respect to the ground
levelOut()
{
vector myVec = llRot2Euler(llGetRot());
vector newVec = <0, 0, myVec.z>;
rotation newRot = llEuler2Rot(newVec);
llSetRot(newRot);
}
// goHome()
// move the object back to its home position
// home is set the the position of the object when it is created,
// and can be set to a new position using setHomeHere()
goHome()
{
llSetPos(home);
//levelOut();
}
// setHomeHere()
// set the home position to the current position
setHomeHere()
{
home = llGetPos();
}
// startListening()
// listen for messages on both channel 0, the public channel,
// and channel 1, where broadcasts are sent
startListening()
{
llListen(0, "", "", "");
llListen(1, "", "", "");
}
// initInternal()
// do some setup for internal functions
// this includes setting various variables to their defaults
// clearing text on the object, and turning on
// the repeating sensor and timer events
initInternal()
{
setHomeHere();
penState = FALSE;
penColor = 0;
color = 0;
ghost = 0;
sizePercent = 100;
originalScale = llGetScale();
ownerKey = llGetOwner();
llSetText("", <1,1,1>, 0);
llSensorRepeat("", "", AGENT, 96, PI, .1);
llSetTimerEvent(.1);
startListening();
}
initAll() {
initInternal();
}
timer1(){
if ((distanceToOwner() > 5)) {
pointTowardOwner();
up(1);
move(1);
down(1);
}
}
collision1(){
say("sorry");
}
touch1(){
pointTowardOwner();
up(1);
move(1);
say("hop");
down(1);
}
default
{
state_entry()
{
initAll();
}
on_rez(integer start_param)
{
initAll();
}
sensor(integer n)
{
numAvatarsNearby = n;
nearestAvPosition = llDetectedPos(0);
integer i;
for (i=0; i
ownerPosition = llDetectedPos(i);
}
}
}
touch_start(integer n) {
touch1();
}
collision_start(integer n) {
collision1();
}
listen(integer channel, string name, key id, string msg) {
}
timer() {
timer1();
}
}
//
//
//
2008年07月28日
画期的! LSLがパズル感覚で作れる!
Scratch for Second Life (S4SL)
LSLがパズルを組み合わせるようにして作れます。
LSLがわからなくてもアイデアしだいで面白いものがつくれそうです。!
http://web.mit.edu/~eric_r/Public/S4SL/
ダウンロードします。
ITど素人の私でもいろいろな動きのLSLが作れました。
わたしのようなLSLがわからない者にとってはすごく便利で、面白いです。
jumpと入力すると1m上がりすぐに元に戻るスクリプトをつくりました。
Copy Linden script でLSLがコピーできます。
LSLがパズルを組み合わせるようにして作れます。
LSLがわからなくてもアイデアしだいで面白いものがつくれそうです。!
http://web.mit.edu/~eric_r/Public/S4SL/
ダウンロードします。
ITど素人の私でもいろいろな動きのLSLが作れました。
わたしのようなLSLがわからない者にとってはすごく便利で、面白いです。
jumpと入力すると1m上がりすぐに元に戻るスクリプトをつくりました。
Copy Linden script でLSLがコピーできます。
Posted by SLドリーマー at
00:14
│Comments(0)
2008年07月27日
ボイスでリアルのように話す。
voice chatで口を動かせるようになりました。
実験しました。
視線はAltキーと左クリックで自由にコントロールできます。
視線と口の動きでリアルの話し方に迫ってみました。
実験しました。
視線はAltキーと左クリックで自由にコントロールできます。
視線と口の動きでリアルの話し方に迫ってみました。
Posted by SLドリーマー at
08:55
│Comments(0)
2008年07月26日
SLコンサートWebで生中継中!
生中継の全録画分閲覧
生中継の予定など詳しくは
セカンドライフ生中継生ライブ生放送まで
http://www.slnama.tv/
生ライブ生放送中
セカンドライフ生中継生ライブ生放送テレビ
Big Size
セカンドライフ生中継生ライブ生放送テレビ
2008年07月26日
Google Maps Street View
Google は都市を車でビデオ撮りしている。
肖像権のことがあるし、日本でも同じことができるのかな。
A Google Street View Car
肖像権のことがあるし、日本でも同じことができるのかな。
A Google Street View Car
Posted by SLドリーマー at
09:12
│Comments(0)
2008年07月25日
2008年07月24日
近々Monoで処理速度が早くなる。②
ITど素人のわたしにはよくわかりませんが、近々Monoが来るというブログをみました。
http://blog.innx.co.jp/
なんか処理速度が速くなるみたいです。
SLのラグが少なくなるのかな?
どんな風に変わるのか期待してます。
リンデンラボによると、これらの動画からもわかるように、「Mono」は、「LSL2」の約4倍の速さでスクリプトを処理できるとのこと。また同時に、CPUの使用時間も、「Mono」は「LSL2」の約25パーセントに留めることができるという。
この動画ではMonoの方がなぜか遅い。
http://blog.innx.co.jp/
なんか処理速度が速くなるみたいです。
SLのラグが少なくなるのかな?
どんな風に変わるのか期待してます。
リンデンラボによると、これらの動画からもわかるように、「Mono」は、「LSL2」の約4倍の速さでスクリプトを処理できるとのこと。また同時に、CPUの使用時間も、「Mono」は「LSL2」の約25パーセントに留めることができるという。
この動画ではMonoの方がなぜか遅い。
Posted by SLドリーマー at
16:08
│Comments(0)
2008年07月23日
近々Monoで処理速度が早くなる。
ITど素人のわたしにはよくわかりませんが、近々Monoが来るというブログをみました。
http://blog.innx.co.jp/
なんか処理速度が速くなるみたいです。
SLのラグが少なくなるのかな?
どんな風に変わるのか期待してます。
動画では、ライフゲームを表示するスクリプトを組み込んだオブジェクトを2つ用意し、同じスクリプトを「LSL2」でコンパイルしたものを画面左に、「Mono」でコンパイルしたものをその右側に置いて、処理速度の違いがよくわかるようにしてある。
リンデンラボによると、この動画からもわかるように、「Mono」は、「LSL2」の約4倍の速さでスクリプトを処理できるとのこと。また同時に、CPUの使用時間も、「Mono」は「LSL2」の約25パーセントに留めることができるという。
http://blog.innx.co.jp/
なんか処理速度が速くなるみたいです。
SLのラグが少なくなるのかな?
どんな風に変わるのか期待してます。
動画では、ライフゲームを表示するスクリプトを組み込んだオブジェクトを2つ用意し、同じスクリプトを「LSL2」でコンパイルしたものを画面左に、「Mono」でコンパイルしたものをその右側に置いて、処理速度の違いがよくわかるようにしてある。
リンデンラボによると、この動画からもわかるように、「Mono」は、「LSL2」の約4倍の速さでスクリプトを処理できるとのこと。また同時に、CPUの使用時間も、「Mono」は「LSL2」の約25パーセントに留めることができるという。
2008年07月22日
2008年07月21日
2008年07月20日
「無名の論客グループ」メンバー募集!
昨日の討論会について前回のブログに感想と意見を書きましたが
朝になってよく考えてみると、討論会をもっと増やすことってすごく大事なんじゃないかとあらためて考えました。
討論会はパネルディスカッション形式で何人かのパネラーが意見をだし討論して、聴衆もチャットで参加できるオープンなもの
です。
それを定期的に、できれば毎日開催するのです。
テーマはSLだけにとどまらずRLのことにも広げて、もっといろんなことを取り上げれば、話題に困ることはありません。
討論会ならSLの初心者で、SLにはなじめなくてもRLとおなじように話せばいいだけですので、気楽に参加できます。
それにSLの最大の魅力はコミュニケーションであり、それを深めるためにいろんなイベントを行っているわけですが、
直接たくさんの人が集まって討論するほうがよりダイレクトだと思うのですが。
ただできるだけたくさんのパネル討論会を開くためには
①パネラーが必要です。
②パネラーをまとめる司会者が必要。
この条件さえあれば、たとえ聴衆がいなくても開く意義はあると思います。
このパネラーと司会者さえ集められば
毎回毎回 パネラーと司会者集めるのは多くのパネル討論会を開くのためには効率が悪いです。
そこで
誰でも参加できるオープンな「無名の論客グループ」(仮名)を立ち上げてはどうかと思いました。
自分の意見を持ち、主張したいと思っている人をあらかじめメンバー登録しておき、「無名の論客グループ」のメンバーの中
から、まずテーマや開催日、参加希望者を募り、パネル討論会を開催することで効率的に運営できると思うのですが。
それで「無名の論客グループ」(仮名)の参加者を募集いたします。
それとグループを率いるリーダー。
言い出した私はSL暦1年3ヶ月ですが、引きこもり1年3ヶ月でSLでの友人0ですのでリーダーシップには自信がありません。
裏方は得意なんですが。
「無名の論客グループ」(仮名)メンバーが多ければ、いろんなテーマを扱えますし、毎日討論会をメンバーが交代しながら
開くこともできます。
「無名の論客グループ」(仮名)参加希望者はこのブログのコメント欄か、
メールください。 sonick731@gmail.com
朝になってよく考えてみると、討論会をもっと増やすことってすごく大事なんじゃないかとあらためて考えました。
討論会はパネルディスカッション形式で何人かのパネラーが意見をだし討論して、聴衆もチャットで参加できるオープンなもの
です。
それを定期的に、できれば毎日開催するのです。
テーマはSLだけにとどまらずRLのことにも広げて、もっといろんなことを取り上げれば、話題に困ることはありません。
討論会ならSLの初心者で、SLにはなじめなくてもRLとおなじように話せばいいだけですので、気楽に参加できます。
それにSLの最大の魅力はコミュニケーションであり、それを深めるためにいろんなイベントを行っているわけですが、
直接たくさんの人が集まって討論するほうがよりダイレクトだと思うのですが。
ただできるだけたくさんのパネル討論会を開くためには
①パネラーが必要です。
②パネラーをまとめる司会者が必要。
この条件さえあれば、たとえ聴衆がいなくても開く意義はあると思います。
このパネラーと司会者さえ集められば
毎回毎回 パネラーと司会者集めるのは多くのパネル討論会を開くのためには効率が悪いです。
そこで
誰でも参加できるオープンな「無名の論客グループ」(仮名)を立ち上げてはどうかと思いました。
自分の意見を持ち、主張したいと思っている人をあらかじめメンバー登録しておき、「無名の論客グループ」のメンバーの中
から、まずテーマや開催日、参加希望者を募り、パネル討論会を開催することで効率的に運営できると思うのですが。
それで「無名の論客グループ」(仮名)の参加者を募集いたします。
それとグループを率いるリーダー。
言い出した私はSL暦1年3ヶ月ですが、引きこもり1年3ヶ月でSLでの友人0ですのでリーダーシップには自信がありません。
裏方は得意なんですが。
「無名の論客グループ」(仮名)メンバーが多ければ、いろんなテーマを扱えますし、毎日討論会をメンバーが交代しながら
開くこともできます。
「無名の論客グループ」(仮名)参加希望者はこのブログのコメント欄か、
メールください。 sonick731@gmail.com
Posted by SLドリーマー at
10:34
│Comments(0)
2008年07月20日
Mirai Japan討論会で感じたこと!
Mirai Japan討論会に参加しました。
ただ見ていただけですが。
テーマは衰退するSLをどう盛り返したらいいのかということでした。
SLのアクティブ人口の減少が激しいので、何とかならないかと5人のゲストがボイスで話してました。
あのNeko Linkさんも参加してました。
Neko Linkさんの存在感、そして考えにはいつも関心して聞き入ってしまいます。
司会者のMiraiさんはSLの人口減少に危機感を感じていましたが、他のゲストの人はそれほど
危機感は持っておらず、今の状態はよくないけれど、まあそんなものではないかと思っているみたいです。
もっと深いところにまで突っ込んで討論してなかったですが、結構おもしろかったです。
1時間はあっというまで、結論らしきものもでなかったように思います。
でも私個人としては、それでもよかったのではと思います。
5人のパネラーがそれぞれ自分の考えを言ってるのを聞いているだけでも、刺激を受けました。
司会者のMiraiさんがSLを活性化するにはどうしたらいいか、Miraiさんの意見をいってましたが、
わたしもこの討論会を終えて考えましたが、
わたしのSL活性化をする方法としては、まさにこういった討論会をもっと頻繁に行ったらどうかなと思いました。
今でも公開討論会に近いものは、たまに行われていますがもっといろんなテーマでいろんな場所で
毎日どこかで行われるようになればSLももっと面白くなります。
SLの初心者でも自分の意見を主張できる場所があれば、やめずに残っていると思います。
こういった討論会を不定期にするのではなく、定期的にスケジュールに組み込めばどうかなと
個人的には思いました。
そしてゲストのパネラー同士がボイスで話してましたが、客席からもチャットでもっと参加しやすいように工夫すること
でもっと盛り上がります。
ただ 討論を仕切る司会者は重要で、その司会者の負担は相当大きいですが。
私には絶対できないけど!
ただ見ていただけですが。
テーマは衰退するSLをどう盛り返したらいいのかということでした。
SLのアクティブ人口の減少が激しいので、何とかならないかと5人のゲストがボイスで話してました。
あのNeko Linkさんも参加してました。
Neko Linkさんの存在感、そして考えにはいつも関心して聞き入ってしまいます。
司会者のMiraiさんはSLの人口減少に危機感を感じていましたが、他のゲストの人はそれほど
危機感は持っておらず、今の状態はよくないけれど、まあそんなものではないかと思っているみたいです。
もっと深いところにまで突っ込んで討論してなかったですが、結構おもしろかったです。
1時間はあっというまで、結論らしきものもでなかったように思います。
でも私個人としては、それでもよかったのではと思います。
5人のパネラーがそれぞれ自分の考えを言ってるのを聞いているだけでも、刺激を受けました。
司会者のMiraiさんがSLを活性化するにはどうしたらいいか、Miraiさんの意見をいってましたが、
わたしもこの討論会を終えて考えましたが、
わたしのSL活性化をする方法としては、まさにこういった討論会をもっと頻繁に行ったらどうかなと思いました。
今でも公開討論会に近いものは、たまに行われていますがもっといろんなテーマでいろんな場所で
毎日どこかで行われるようになればSLももっと面白くなります。
SLの初心者でも自分の意見を主張できる場所があれば、やめずに残っていると思います。
こういった討論会を不定期にするのではなく、定期的にスケジュールに組み込めばどうかなと
個人的には思いました。
そしてゲストのパネラー同士がボイスで話してましたが、客席からもチャットでもっと参加しやすいように工夫すること
でもっと盛り上がります。
ただ 討論を仕切る司会者は重要で、その司会者の負担は相当大きいですが。
私には絶対できないけど!
Posted by SLドリーマー at
01:35
│Comments(1)
2008年07月19日
ただいま討論生中継中!7/19
生中継の全録画分閲覧
生中継の予定など詳しくは
セカンドライフ生中継生ライブ生放送まで
http://www.slnama.tv/
生ライブ生放送中
セカンドライフ生中継生ライブ生放送テレビ
セカンドライフ生中継生ライブ生放送テレビ
Big Size
生中継の予定など詳しくは
セカンドライフ生中継生ライブ生放送まで
http://www.slnama.tv/
生ライブ生放送中
セカンドライフ生中継生ライブ生放送テレビ
セカンドライフ生中継生ライブ生放送テレビ
Big Size
2008年07月19日
Google Earthの中の仮想世界!
オランダの企業がGoogle Earthの中に仮想世界を既に構築してるみたいです。
この技術が活用されれば、Google Earthの中に同じような仮想世界がたくさんできてくるのでは
ないのかな?
今は点と点でしかないけれど、つながって大きな面になるかもしれません。
Google Earthの仮想都市の中でアバターが動いてます。
http://www.cebra.eu/index.php?id=0&sub=1&lang=1
この技術が活用されれば、Google Earthの中に同じような仮想世界がたくさんできてくるのでは
ないのかな?
今は点と点でしかないけれど、つながって大きな面になるかもしれません。
Google Earthの仮想都市の中でアバターが動いてます。
http://www.cebra.eu/index.php?id=0&sub=1&lang=1
Posted by SLドリーマー at
10:34
│Comments(0)
2008年07月18日
2008年07月17日
Google Earthでライブ映像の衝撃!②
http://www.sentinelave.com/
Google Earthでライブの映像がどこからでも簡単に見られるよになり、アバターがGoogle Earth上で動かせるように
もしそうなった場合。
そんな近未来を空想してみます。
A百貨店の場合
広大なA百貨店の各所いたるところに、カメラが設置されています。
カメラはGoogle Earthにつながり、Google Earthを使って世界中から様子を観察できるように
設定されています。
そして深夜にトラブルが発生した場合、百貨店の責任者はGoogle Earthを通して百貨店内部を把握し、
責任者自身のアバターをGoogle Earth上の百貨店に飛ばします。
そして警備会社から派遣されたアバターとGoogle Earth上でトラブルに対処する方法をアバター同士で
打ち合わせします。
そのGoogle Earth上の百貨店にはトラブルの連絡を受けた社長、重役などのアバターが集結してトラブルに
対処することもできます。
深夜、遠く離れた場所にいながら、Google Earth上の百貨店に緊急に集まり、具体的な対策を仮想空間上で
とることも可能になるのです。
パリでコレクションが行われています。
その様子はいろんな角度からカメラで撮影されそれが3Dの映像として合成され、Google Earth上に公開されます。
日本にいながら、Google Earthでみたコレクションに興味があれば、アバターをGoogle Earth上の会場にテレポート
させ、Google Earth上にいる日本語の分かるアバターの販売員と同じ映像を見ながら、交渉することも可能になります。
Google Earth上のライブの映像をいつでも見れて、アバターが利用できるようになれば、もっといろんな可能性が生まれてきま
す。バーチャル世界と現実世界がGoogle Earth上でつながり、現実生活がもっと便利になります。
SLが注目され、普及しつつあるのは、いろんな理由があると思いますが、バーチャル世界がリアルの世界にも
影響を与えることができるということも大きな魅力の一つです。
でもGoogle Earth上のこれらの映像をみると、
仮想世界をリアル世界の道具としようとしている点については、GoogleはSLより一歩先を行く可能性を感じます。
仮想世界の中で仮想生活を楽しむという点についたは、断然SLのほうが面白いと思いますが、
SLの利点をリアル社会に役立たせるような仕組みが育たないと、仮想世界のある部分はGoogleに取って代わられる
のではないかとふと思ってしまいました。
Disney World 3D in Google Earth
Google Earth 3D Tour in Osaka
Google Earthでライブの映像がどこからでも簡単に見られるよになり、アバターがGoogle Earth上で動かせるように
もしそうなった場合。
そんな近未来を空想してみます。
A百貨店の場合
広大なA百貨店の各所いたるところに、カメラが設置されています。
カメラはGoogle Earthにつながり、Google Earthを使って世界中から様子を観察できるように
設定されています。
そして深夜にトラブルが発生した場合、百貨店の責任者はGoogle Earthを通して百貨店内部を把握し、
責任者自身のアバターをGoogle Earth上の百貨店に飛ばします。
そして警備会社から派遣されたアバターとGoogle Earth上でトラブルに対処する方法をアバター同士で
打ち合わせします。
そのGoogle Earth上の百貨店にはトラブルの連絡を受けた社長、重役などのアバターが集結してトラブルに
対処することもできます。
深夜、遠く離れた場所にいながら、Google Earth上の百貨店に緊急に集まり、具体的な対策を仮想空間上で
とることも可能になるのです。
パリでコレクションが行われています。
その様子はいろんな角度からカメラで撮影されそれが3Dの映像として合成され、Google Earth上に公開されます。
日本にいながら、Google Earthでみたコレクションに興味があれば、アバターをGoogle Earth上の会場にテレポート
させ、Google Earth上にいる日本語の分かるアバターの販売員と同じ映像を見ながら、交渉することも可能になります。
Google Earth上のライブの映像をいつでも見れて、アバターが利用できるようになれば、もっといろんな可能性が生まれてきま
す。バーチャル世界と現実世界がGoogle Earth上でつながり、現実生活がもっと便利になります。
SLが注目され、普及しつつあるのは、いろんな理由があると思いますが、バーチャル世界がリアルの世界にも
影響を与えることができるということも大きな魅力の一つです。
でもGoogle Earth上のこれらの映像をみると、
仮想世界をリアル世界の道具としようとしている点については、GoogleはSLより一歩先を行く可能性を感じます。
仮想世界の中で仮想生活を楽しむという点についたは、断然SLのほうが面白いと思いますが、
SLの利点をリアル社会に役立たせるような仕組みが育たないと、仮想世界のある部分はGoogleに取って代わられる
のではないかとふと思ってしまいました。
Disney World 3D in Google Earth
Google Earth 3D Tour in Osaka
Posted by SLドリーマー at
15:57
│Comments(0)
2008年07月16日
Google Earthでライブ映像の衝撃!
驚きの映像です。
Google Earth上でライブ映像が見れるとは!
そこまで技術がきてるとは!
世界中のライブ映像をどこからでも見ることができるようになり、
そしてその中でアバターが活動するようになるのか?
もしそうなれば、SLとは別の新しい仮想世界ができる予感がします。
Google Earth上でライブ映像が見れるとは!
そこまで技術がきてるとは!
世界中のライブ映像をどこからでも見ることができるようになり、
そしてその中でアバターが活動するようになるのか?
もしそうなれば、SLとは別の新しい仮想世界ができる予感がします。
Posted by SLドリーマー at
10:03
│Comments(0)