string my_sit_message = "mysit1";
string my_unsit_message = "myunsit1";
default {
link_message(integer sender_number, integer NumberOfAvatars, string message, key AvatarKey) {
if (sender_number != llGetLinkNumber()) return;
if (message == "sitmessage") {
if (NumberOfAvatars != 1) return;
llMessageLinked(LINK_ALL_OTHERS, NumberOfAvatars, my_sit_message, "");
}
else if (message == "unsitmessage") {
if (NumberOfAvatars) return;
llMessageLinked(LINK_ALL_OTHERS, NumberOfAvatars, my_unsit_message, "");
}
}
}
string my_sit_message = "mysit1";
string my_unsit_message = "myunsit1";
float SIT_ALPHA = 0.0 ;
float UNSIT_ALPHA = 1.0 ;
string TEXT="TEST TEXT";
string SITTEXT="";
vector col=< 1.0 , 1.0 , 1.0 >;
float transp= 1.0 ;
default {
state_entry() {
llSetAlpha(UNSIT_ALPHA, ALL_SIDES);
llSetText(TEXT, col, transp);
}
on_rez(integer r) {
llResetScript();
}
link_message(integer sender_num, integer num, string str, key id) {
if (str == my_sit_message) {
llSetAlpha(SIT_ALPHA, ALL_SIDES);
llSetText(SITTEXT, col, transp);
}
else if (str == my_unsit_message) {
llSetAlpha(UNSIT_ALPHA, ALL_SIDES);
llSetText(TEXT, col, transp);
}
}
}