In the meantime I wrote this script which sends messages from the sender prim to the receiver prim and tells it to fade away the more it is clicked.
The Red Message Sending Box/Prim:
integer chan = -12878;
default
{
state_entry()
{
llOwnerSay( "Sending prim ready");
}
touch_start(integer total_number)
{
llSay(chan, "Hello, this is from RK");
}
}
The Blue Spinny Thing that receives messages from Red Message Box.
float spin_rate = 0.1;
integer chan = -12878;
float alpha = 1.0;
default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
llListen(chan, "", "", "");
llTargetOmega(<1.0,0.0,0.0>,spin_rate,0.2);
}
listen(integer channel, string name, key id, string message)
{
llSay(0,"I heard:"+message);
alpha = alpha - 0.1;
llSetAlpha(alpha,ALL_SIDES);
if (alpha < 0.0)
{
alpha = 1.0;
}
}
}
No comments:
Post a Comment