Wednesday, 12 March 2008

Animations for my jumpper(Unsuccessful attempts)

I tried the code bfore for jumpping but I didn't get any thing so instead and during the last week I tried the following code which also doesn't work although
I add llstopAnimation("prejump"); and llstopAnimation("land"); and so on to the last code but all of them don't work. I descovered later that they just animations made by another program which called boser or another applications. and these animation must be attached with the object. moreover, the StartAnimation is just for the owner of the object.

here the last code I tried:

default
{
collision(integer detected)
{
llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION);
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llStartAnimation("prejump");
llSetTimerEvent(10.0);//I tried to make the event remains for 10 seconds
//llSleep(3);//I cancelled this one becuase it doesn't make the animation
//work continously
llStopAnimation("prejump");

llStartAnimation("jump");
llSetTimerEvent(10.0);
// llSleep(3);
llStopAnimation("jump");

llStartAnimation("fly");
llSetTimerEvent(10.0);
//llSleep(3);
llStopAnimation("fly");

llStartAnimation("land");
llSetTimerEvent(10.0);//I tried to make the event remains for 10 seconds
// llSleep(3);
llStopAnimation("land");



//llStartAnimation("jump");
//llStartAnimation("fly");
llOwnerSay("animation will end in 10 seconds");
//llSetTimerEvent(10.0);
//llStopAnimation("jump");
}
}
}
feel free to take my code and improve it.
==================================================================================
another code I tried is the following:
default
{
attach(key avatar)
{
vector force = <0,0, llGetMass() * 6.2>;
llSetForce(force, TRUE);
if(avatar==NULL_KEY)
{
llSetForce(<0,0,0>,TRUE);//the force is used with physical prims
}
}
}
====================================================================================

Thursday, 28 February 2008

Fetching a URL and Parsing the Result and more scripts

If you would like to fetch a URL and go to web site from SL with a response and parsing the result,,,, the problem with this code is it doesn't open any sourceURL except "http://blog.secondlife.com/feed/".however, I'd refered to the book and found the wrong, so after if statment to check if the http is ok I sould use llLoadURL immedatilly((the correct code at the end
// Get the first link in the first item in an RSS feed and open it in
// the user's web browser when the object is touched
//
// This script is very naive and not very robust. It expects only
// one user to be clicking on it at a time.

// URL for the RSS feed
string sourceURL=
"http://blog.secondlife.com/feed/";

// The standard HTTP success response code
integer HTTP_OK = 200;

// Key of the resident that clicked on the object. Saved in the
// touch_start event so that it can be used in the http_response event.
key requestingResident = NULL_KEY;


// Parse an HTTP response that should be an RSS feed and return the
// first link from the first item, or "" if the link could not be found
//
// body is the response from an HTTP request. Since HTTP requests are
// currently limited to 2048 characters, and since this is unknown data
// from the outside world, the body may or may not actually contain the
// information we want.
//

string getFirstItemLink(string body)
{
// Find the start of the "items" in the RSS feed
string startItems = "";
if (llSubStringIndex(body, startItems) == -1)
{
return "";
}

// get the string from the beginning of the first item to the end
// of the body
string items =
llGetSubString(body, llSubStringIndex(body, startItems), -1);

// find the first link in the items
string startLink = "";
string endLink = "";
integer startIndex = llSubStringIndex(items, startLink);
integer endIndex = llSubStringIndex(items, endLink);

// make sure startLink and endLink were found, and startLink is
// before end link
if (startIndex != -1 && endIndex != -1 && endIndex > startIndex)
{
string link =
llGetSubString(
items,
startIndex +llStringLength(startLink),
endIndex - 1);
// Got it!
return link;
}
else
{
return "";
}
}

default
{
touch_start(integer total_number)
{
// Save the requestor
requestingResident = llDetectedKey(0);

llSay(0, "Fetching: " + sourceURL);
// Get the RSS feed
llHTTPRequest(sourceURL, [], "");
}

http_response(key id, integer status, list metadata, string body)
{
// check if the page was successfully fetched
if (status == HTTP_OK)
{
string link = getFirstItemLink(body);
if (link != "")
{
// Got the link, load it in the user's browser
llLoadURL(requestingResident, "", link);
}
else
{
// Got a response, but didn't get the link
llSay(0, "Could not find link");
}
}
else
{
llSay(0, "Couldn't fetch page, http status: " +
(string)status);
}

// reset this variable
requestingResident = NULL_KEY;
}
}
here is the correct code to fetch URL:
integer HTTP_OK = 200;
key requestingResident = NULL_KEY;
string sourceURL= "http://baderalkhamees.blogspot.com/"; //to my blog here
default { touch_start(integer total_number)
{ requestingResident = llDetectedKey(0);
llHTTPRequest(sourceURL, [], ""); }
http_response(key id, integer status, list metadata, string body)
{ // check if the page was successfully fetched
if (status == HTTP_OK) { // Got the link, load it in the user's browser
llLoadURL(requestingResident, "", sourceURL); }
else {
llSay(0, "Couldn't fetch page, http status: " + (string)status);
}
// reset this variable
requestingResident = NULL_KEY; }
}
===================================================
the following script is to move the object when it is collidded...

default
{
state_entry()
{
llSetStatus(STATUS_PHYSICS, TRUE);// first you should change the statuse to
//physics by writing TRUE after STATUS_PHYSICS because thats enable the prim to be
//moved
}

collision_start(integer num_detected)// here the function must be collision to
//move
{

vector shove = llGetPos() - llDetectedPos(0);
shove = llVecNorm(shove);
shove = shove * 100.0;// 100.0 is the destince the prim will move
llApplyImpulse(shove, FALSE);
}
}

Wednesday, 27 February 2008

Making a flower or small tree seem to be real(small tips)

IN the second life we should add flowers like the real life. To do so:

- make square with flatten until (.10) in the size of x
- change the transparancy to be at maximum.
- put the flower you have in your texture folder as a texture for that square.
- now, copy the square three copies. and make them as cyrcle around each other.

they finally should appare that they have 4 sides views.

I just last week knew that the texture should be manner to appare as it is.

so when you choose a texture consistents of squares. change the property to manner.

finally to work with more than one viewers of the second life do the steps as follows:
- make a copy of the executable file under the secondlife folder.
- past that copy in the desktop and then right-click on it and select the properties.
- add to the target at the end after space multiuser.

last thing i'd like to mention is:
to allow other beople to sit in your object click left on your object and then select
edit ---> general-->(at the button)when left-clicked-->choose sit on object.

thank you.

Sunday, 24 February 2008

Video Edit Magic for editing your video or your sounds

After I got well with CamStudio which is used to make movies to what happean in your screen, I know switching my work to Video Edit Magic which easier than Premier pro. wich I used before few weeks ago. It is easier because you find the main features you really need just around in the main window as follows:

From the main window you can, for example, add Text/Title effect from the button just under the menus.
but before that you must bring your files(video or audio) to the project you work in.
To do so open file and choose open then drag your file to the TimeLine and of course for the video track then pring your another vidoe files or audio in the same way.
when i add Text effect to your screen I tried to find Text effects but unfortunalty there are basic effects which is considered as weakness.
the time line is the same as the Premier's time line but simpler.
I tried to find the feature which allows me to take a screenshot but I couldn't..I used the help menue to find that but still unable to find it. I will look at some furoms

as shown in the next pictures:
first choose the new project:

second this is the main window:


To make your movie just select make movie from the pull-down "file":

Thursday, 21 February 2008

Today,,CamStudio or Fraps


Hello every one..

this Program Task is: Record what you do in you desktop or any other programs you running in your screen. and will help you with your tutorails.of course with Video Edit Magic or Premier pro.
Difficulity: Easy
The main window as follows:
first, choose the full window to record your whole window and then press the record putton and that's all.
of course there are more than this featur. after you finish recording your movie, press stop. and then automatically play window will appear which you can through it play your movie.
Moreover, to minimize the program window to just use play, pause, stop, and so on
use the the Toggle View(press one or two)

for the sound options the user can choose on of three choices as shown below:


Thanks.
see you.
Bader

Thursday, 14 February 2008

Water effects in Second Life and making fountain by using llParticleSystem

apologise for being late that because I had no laptop last week....

today I am going to talk about the water effects in second life :
firstly: I will start with simple way to create rippling water for a pond or swimming pool..

second, create two prims and give them the same size and flatten them as thin as possible(it's = 0.010)..

place them so the first one is just above the second one...

thirdly, from the Second Life library choose the water texture “Water - ripple layer 1″and choose “Water - ripple layer 2″for the another one...the last textures under the folder "the Waterfalls folder"....

forth, use the following scripts to make the animation works:
for the first one add:

default
{
state_entry()
{
llSetTextureAnim(ANIM_ON | LOOP | SMOOTH | ROTATE, ALL_SIDES,
1, 1, 1, 1, -0.025);
}
}

for the second one add:

default
{
state_entry()
{
llSetTextureAnim(ANIM_ON | LOOP | SMOOTH | ROTATE, ALL_SIDES,
1, 1, 1, 1, 0.025);
}
}

note that the lat one will rotate in the opposite direction...

that was for today..
see you later with more complex water effects...
IF YOU NEED MORE INFORMATION REFER TO :
http://secondview.wordpress.com/tag/water/

llParticleSystem :
this function is greate becuase many thing you can do them by it.

- it is change the color and fade out and get bigger.
- control the angel of the things shooted up from a emmiter

default
{
state_entry()
{
llParticleSystem( [
// Create a narrow code of particles that shoot up
// from the emitter
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE_CONE,
PSYS_SRC_ANGLE_END, PI / 8.0,
PSYS_SRC_BURST_SPEED_MIN, 2.0,
PSYS_SRC_BURST_SPEED_MAX, 10.0,

// Apply a downward acceleration to the particles so
// they come back down again
PSYS_SRC_ACCEL, <0.0, 0.0, -2.0>,

// Turn on color and size interpolation
PSYS_PART_FLAGS,
PSYS_PART_INTERP_COLOR_MASK |
PSYS_PART_INTERP_SCALE_MASK,

// Set the start color to white and the end color to blue
PSYS_PART_START_COLOR, <1.0, 1.0, 1.0>,
PSYS_PART_END_COLOR, <0.0, 0.0, 1.0>,

// Start at full opacity, fade to full transparency
PSYS_PART_START_ALPHA, 1.0,
PSYS_PART_END_ALPHA, 0.0,

// Start out small, grow
PSYS_PART_START_SCALE, <0.25, 0.25, 0.0>,
PSYS_PART_END_SCALE, <2.0, 2.0, 0.0>,

// Use the UUID of one of the Library textures,
// Water Particle-Mist
PSYS_SRC_TEXTURE, "dcab6cc4-172f-e30d-b1d0-f558446f20dd4"
]);
}

}
=======================================================================
I tried the animation for my Jumpper for the swiming pool but it doesn't work completely:(here the code)
default
{
collision(integer detected)
{
llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION);
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llStartAnimation("jump");
//llStartAnimation("jump");
//llStartAnimation("fly");<----I tried to add the fly anim but doesn't help
llOwnerSay("animation will end in 10 seconds");
//llSetTimerEvent(10.0);
//llStopAnimation("jump");
}
}
}
***********************************************************************************
I also tried this code to excersize the listen function,,this code change the color
of my object when receives a message from the any avatar.

default
{
state_entry()
{
llListen(0, "", NULL_KEY, "");//here I invoke the listen function
// 0 = channal ,,,, NULL_KEY =anyone ,,,
}
listen(integer channel, string name, key id, string message)//receive the message
{

if (message == "red")//if the message is red
{
llSetColor(<1,0,0>, ALL_SIDES) ; //set the color from each side
}else if (message == "black")//if the message is black
{
llSetColor(<0,0,0>, ALL_SIDES) ;//set the color from each side
}else if (message == "white")//and so on
{
llSetColor(<1,1,1>,ALL_SIDES) ;
}else if (message == "gray")
{
llSetColor(<0.5,0.5,0.5>,ALL_SIDES) ;
}
}

}

bye

Tuesday, 5 February 2008

Premiere is world of possiblities

Today,,,I feel lost from the second life 'cos honstly it's difficult at the beginning but I'm sure it's intersting later on(when?) I don't have an answer..

anyway, In the second life and in order to use the prims usefully you need to use the feature "path cut" which has two paramater one to cut from the beginning and the another to cut from the end...the path cut takes values between 0 and 1...
but it's really useful...how? well, when you want to make for example stairs you can use the values 0.250 and 0.875 and you will get a frist step....rather than using two prims to do so...enjoy ...and to make windows and water you will need the transparancy which takes values to increase or decrease the transparancy...

Premiere.....
My problem is that not clear where are the functions that you need so you should either follow instructions or spend lots of your time descovering where are them and the the time line in premier is also not clear enough for example if you need to make imortant things like remove a part from the video but from the end I were using that one from the beginning till I found that holding click on that command till the other commands appears...




in premiere version 6: firstly there is an attached folder which contains the files you will work on for your first project...

1- choose the style you will work with..



and then choose the video type chioce:


then the main window which contains the important windows like the time line and the project window that holds your files(videos and audios and text and so on)

2- import you files under the path C:program files\premiere\sample files. Import these file by the project folder in the top right corner by right-click on it and choose import then select the files from the path above and then you find them as follows:


3- you will work in many widows but for now just focus on the monitor window which has two screens one called the source and the other called the program the first one you will work on it to edit you files and the other screen is the result...drag your files from the project window to the source window in the monitor:


4- the second very important window is the time line at the button which contain the files you will work on..try to be familiar with the buttons on it....it has initially two tracks for the vedio and three for the audio 1, 2 and 3 orderly..

5- drag the files from the project to the vedio or audio track and and then douple-click to see your file in the source screen...

some imoprtant issues you should take in account like:
1- the hestory window which hekp me to backward from last operations I've done...
2- the info window which give me exactly where I am in the movie.
3- the transation, video and Audio window which helps to add effects to your movie.
4- to add Text I found it difficult to controll the text but after trying the title many times which needs to explore the right-click options(on the text) to add the text just go to file menue and from new choose title. and then add the text,,
this is to make separate text part but to add to the video I couldn't find it yet.
5- the { and } in the time line line are important to cut from the beginning or from the end.
6- to see the effects on your film after modification just press Enter or instead to save your time hold Alt while you move the time line...
7- to add motion to your video just right-click on it and choose the video option and then choose motion

8- finally,, when you want to see your movie go to file menue and then choose export time line and choose movie.
congradulation your movie under the directory you've chosen..

Saturday, 2 February 2008

using transparency and more ..

you can make windows and glasses by using the transparency in the edit window.
moreover, the following land leads you to be proffesional in the Second Life...
Heartbeat community ....

To flatten any area you could use the land icon in the edit window and then change the surface of your land that's of course after have the permmition from the owner...

To be honst, the movement is still problem but using alt and the mouse to look at the object from many directions you create your object is useful,,also using alt+ctrl
to change the size of your objects...
The trick with scripts is to find the suitable ones for your work..

Friday, 25 January 2008

Free Stuff at Sarah.....and basic scripts

I tried today the scripting language in SL....which as usual with "hello world"

it seems easy to do but it really needs exploring in wiki SL to find the functions you need at

http://rpgstats.com/wiki/index.php?title=Detected

it's not easy to modify especially to hard things like the stuff in the CD inclosed with the textbook.
this code to detect the name of the avatar...
float time = 0.1;
default
{
//the touch envoked when the avatar touch the object
//and detect his name by llDetectedName(0)
touch(integer num_detected)
{
llSay(0, "Hello!"+ llDetectedName(0));//here the object says hello "name"
//and this message will be heard within 20 meters

}

touch_start(integer total_number)
{
llSay(0, "hello");// this function will just say hello when touched
llSetTimerEvent(0.1);//the last event will remain for 1 second

}
timer()
{
time = time + 0.1;
}
touch_end(integer num_detected)
{
llSetTimerEvent(0.0);
llInstantMessage(llDetectedKey(0),llDetectedName(0) + ".... you held down your mouse button for " + (string)time + "seconds.");// at the end of the touch event the object will tell the user how long time he has held down his mouse.
}
}


but I really like the script codes....

once again the movement is difficult and you may loss your patiance at any time.

the Free Stuff I found in amazing land at

sarah nerd's

but that earing money in SL needs help and moving from the SL to another website to fill in a survey....just an example... and dancing is another way to earn money....

Blogger just now has become clever and saves your drafts automatically!!!!...

another thing is that using < result in error!!!!!!!!

Thursday, 24 January 2008

Movement in the SL..could be easier...

It's the first problem I've met in SL. Because, in my personal opinion, the SL would work more effieciant if it doesn't depent on the keyboard. Most of the successful games use untraditional input devices which called "Novel Technology"<<<< if my memory helps me.

In order to find another means rather than the arrows in the keyboard or the mouse to flay,just an example, I use the shortcuts like ctrl+shft to change the size of an object or E to fly rather than press fly button to do so. Many shortcuts are useful but still boring way to use the keyboard for the movement actions in SL. Hopefully there is another way.

in the script area, I find myself has not known yet when I will start using them especially that they stay in the last chapters of the textbook "creating your world" but I've found in the CD, don't miss out, enclosed with the textbook intersting things like drive a plane or car, I just want to know when I really need them ...

Finally, I attend a class at the SL with a group called Heartbeats....for the scripting topic...

Monday, 21 January 2008

Useful Tutorial at Second Life

Hi every one ...

under the small window in the SL window and under the title

Want to Learn More About Second Life?

http://secondlifegrid.net/resources?ref=login

there are many tobices to learn....

Today, I've learned how to create a video by using premier and how to edit the timeline and add different audio files to my video to make attractive and compatiable full video then how to cut a part of this video and put it in another part

finally, I've got an access to the University Island...

see you soon.

Sunday, 20 January 2008

Download Second Life!!

you can download Second Life from the link below:
http://secondlife.com/community/downloads.php

and visit any where by using the map button

Friday, 18 January 2008

Create an Object in Second Life




Today, I learned how can make and conrol an object in Second Life. To do so I just click the right button and choose create and the chang the size, rotatation, colour and more....
that was from chapter 2 in the Textbook "Creating your World".

honstly, it was amazing but I have not getten an access to the University island So I chose any land to do that. I also had a lesson in priemer to create a video and put a title on it. I will keep working in this way for the next week and hopefuly I can manage to do what I'm supposed to do soon.
Later on, I will refer to Second Life as "SL"
thank you....
best regards

Tuesday, 15 January 2008

First Blog!! First experience!! First Every thing

I've just started yesterday.....

First love....Sorry, I mean this first blog will be for my journey with Multimedia Design...

It's a dairy for my study but it's a new world for me. that's because I've learned just yesterday something really different to what I've believed. I've learned that most of us creative.....why not me? I asked myself...at least tried....myself answered!! then I decide not to believe in some thing before I try it. So the first day was looking for the place which I can do my desire in. It is the Second Life on the web. I'm thinking to find a special character for me.....it seems easy.doesn't it?
I went to the YouTube to find tutorial and I really find lovely and useful stuff there. One of them which I recomend is http://www.youtube.com/watch?v=mVSzh_QTE00
You can learn how to create an object ..... as the beginning it is a great.
but it is not enough so I've found the following amazing link:
Top 10 Second Life Tutorial Videos on YouTube and Google

I hope you share me your idea and provide me your experience in Multimedia Design...
but please don't try to scare me.

good luck for everyone
see you tomorrow...
Bader