walkinglint
2008年02月09日 18:45
//*****************************************************************************
//
// Default state: LSL will always start in this state.
//
//*****************************************************************************
vector int2vector(integer i) {
vector v;
v.x = (float)(i / 10000) / 10.0;
integer tmp = i % 10000;
v.y = (float)(tmp / 100) / 10.0;
v.z = (float)(tmp % 100) / 10.0;
return v;
}
default
{
link_message(integer sender_num, integer num, string str, key id){
if (str == start_str) {
// llOwnerSay((string)llGetLinkNumber() + " is started");
ParticleStart((float)num, id);
} else if (str == stop_str) {
// llOwnerSay((string)llGetLinkNumber() + " is stopped");
ParticleEnd();
} else if (str == start_color_str) {
start_color = int2vector(num);
// llOwnerSay((string)num);
} else if (str == end_color_str) {
end_color = int2vector(num);
}
}
}