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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment