June 30, 2007

LSL-script for a Second Life football

I have been looking into the Linden Script Language (LSL) to be able to do more cool stuff within Second Life.

Here's a small script for a football. The ball can be kicked by just walking against it. Touching it causes the ball to bounce up in the air a couple of feet. You can also talk to it by saying "kick" which causes the ball to move with a certain vector strength and direction. "High kick" makes the ball going forward up in the air.

default {
state_entry () {

llListen (0, "", "","");
// Make sure that Physical is turned on
llSetStatus (1, TRUE);
}

collision_start (integer total_number) {

// Get the vector that points from the kicker to the ball
vector diff = llGetPos() - llDetectedPos(0);

// Force the z coordinate up
diff.z = .1;


// Scale the vector to a fixed length
vector kick_vector = llVecNorm(diff)*5;

// Apply the kick vector to the ball

llApplyImpulse(kick_vector, FALSE);
}

listen (integer channel, string name, key id, string message) {
if (message == "kick") {

// Get the vector that points from the kicker to the ball
vector diff = llGetPos() - llDetectedPos(0);

// Force the z coordinate up
diff.z = .1;

// Scale the vector to a fixed length
vector kick_vector = llVecNorm(diff)*10;


// Apply the kick vector to the ball
llApplyImpulse(kick_vector, FALSE);
}
else if (message == "high kick") {
// Get the vector that points from the kicker to the ball
vector diff = llGetPos() - llDetectedPos(0);


// Set the z-coordinate high up
diff.z =500;


// Scale the vector to a fixed length
vector kick_vector = llVecNorm(diff)*25;

// Apply the kick vector to the ball

llApplyImpulse(kick_vector, FALSE);
}
}

touch_start (integer total_number) {
// Create a manual kick vector where only the z-coordinate has a value separate from zero
vector kick_vector = <0.0,0.0,0.0>;

// Apply the kick vector to the ball
llApplyImpulse(kick_vector, FALSE);
}
}


Copy/type the script into the script editor pane when creating/replacing a new script for an object. Remember you have to be in a place where scripting is allowed to modify it and see the changes in action. Second Sweden allows it and there are many more places.
























Here are a couple of reference pages to get you started:

- This article is good to get you started. I have taken some lines of code from here.
- LSL Portal
- Second Life Tutorials

Technorati tags:
, , , ,


June 14, 2007

My first iGoogle Gadget

*** UPDATE ***
I have updated and improved the Gadget some. It got better looking design and also a new view of the latest content from developerWorks, which is also default. If you added the last one, please update!
*** *** *** *** ***

I was inspired by the iGoogle Gadget that Thomas Adrian made.
You've heard of Google Maps. Now Google Gadgets are getting more popular. And as if that's not enough Google Mapplets are coming as well, which is Google Gadgets that can manipulate a map using the Google Maps API. This is cool!

This is my gadget showing the developerWorks technical library views. Default is Lotus, but you can change that to any of the other views and whether you want to see the summary and how many entries you'd like to see. I have uploaded it to the content directory, where you can get more cool gadgets for your iGoogle.



Technorati tags:
, , ,


June 13, 2007

Domino Designer in Eclipse

If you have tried Eclipse for regular Java programming you know how comfortable it is to work with. As you might know there will be a Domino Designer in Eclipse released sometime in the future and Maureen Leland has posted a couple of screenshots on the new progress on this project. Especially the Java editor is beautiful ;-)



Technorati tags:
, , ,


June 06, 2007

Summary of Lotus Nordic Meeting



Yesterday the Nordic Lotus Meeting was held in Second Life. Thomas "notessidan" Adrian hosted the meeting and although the number of attendees weren't that impressive (approximately 15?) it was in my opinion successful. It was a mix of people from different Nordic countries such as Sweden, Denmark and Norway and with different Lotus skills and experience with Second Life.

The discussions were mainly about Second Life and only brief about Lotus products at this first meeting. Notessidan showed us the stage that he had built for the location and also his Second Life office. We were all impressed and at least I got a bit excited about the possibilities that I can imagine when seing what can be done and when talking to all this people that were there.
We are building relations that seamlessly spans over countries, cultures and different humans with a variety of skillsets.

I can see a small problem with these meetings though that needs some improvement. Although there is an agenda it always turn out to be a slight chaos. People talk at the same time which causes some questions to be mistakenly ignored, someone starts building a big sphere or someone decides to pick up a giant aircraft from their inventory or suddenly someone starts dancing. All this causes some distraction which is completely understandable. Who wouldn't be if it took place in real life?

This is not at all wrong, it is rather amusing and funny actually but when it comes to the point when you would like to have productive and efficient meetings with results something has to be done.

Maybe some sort of guidelines needs to be written for meetings with an intended agenda on how to act to get the results wished for? What do you think?


Some snapshots from the event:


Thomas Adrian, Johan Känngård and me are dancing. Don't remember the other's names.


My first object, a Lotus Notes 8 bench. Do you want it? Contact Nicolas Paravane in SL



Yup, there was beer too...


Technorati tags:
, , ,


June 03, 2007

I love my Weber!

Yesterday I bought a new outdoor grill, a Weber One-Touch Platinum Charcoal Grill, Black. And today I'm a very happy man :-)

When doing the research for which grill I should buy, many people have been into the buy-and-throw philosphy - buy a cheap grill for like 200 SEK (approximately 30 US Dollars) in the spring, throw it when the autumn comes and then buy a new one for the next spring. I am not very fond of that. I think it's better to buy something really good that will last for many years.
And if you take care of it I think it will last, especially if it's a Weber since it won't rust standing outdoors.

Take a look at the product features and technical data here. There is a warranty for 10 years on most parts.







Technorati tags:
, ,


June 02, 2007

Nordic Lotus meeting in Second Life

On tuesday, 5th of June 2007 at 9PM GMT+01 there will be a Nordic Lotus meeting held in Second Life. It is Thomas Adrian, hosting Notessidan.se, who has taken the initiative to this independent event.
Anybody with a great interest in Lotus Notes/Domino and/or other Lotus software are welcome to exchange their thoughts and idéas and to take advantage of each other's knowledge and burning desire to share their competence and perhaps to make new contacts.

The agenda for the first meeting is:

  • Questions for people new to Second Life
  • Tip from everybody on places, activities and what can be done in SL
  • Open discussions on IBM/Lotus software
We will meet in the IBM Sandbox. Take a look at the community event on secondlife.com about this to easier find your way.

If you're new to Second Life or just want to know a little more there are several tutorials:
Please feel free to contact me when you get there if you need any help. My Second Life name is 'Nicolas Paravane' and Thomas Adrian's is 'notessidan Yao'.
See you there :-)

Technorati tags:
, , ,