I just create my first object to sell. It's nothing special, a little kind of food from Brazil (we call pastel).
Here's my problems:
1) I created the object, attached a script (see below) and a wave sound. When someone buy the object, it list all the contents (the script and wave). Can I make the contents not showed in the buying interface?
2) My idea for the script is the following:
The man buy it. And when he WEAR it, it starts an animation to simulate that he is eating, and show a message and play the wave sound (the message and sound only when he wear - only this time).
Here's the script:
// Pastel da feira script v.0.1
// 14/12/2006
// By Flavio Richez
// Based on "Blood Mary" script
string anim ="drink";
string anim2 ="hold_R_handgun";
string sound = "FeiradaFruta";
default
{
attach(key victim)
{
if(victim == NULL_KEY)
{
llStopAnimation(anim);
llStopAnimation(anim2);
llSetTimerEvent(0);
}
else
{
integer is = llGetAttached();
if (is != 0) {
llRequestPermissions(victim,PERMISSION_TRIGGER_ANIMATION);
}
}
}
run_time_permissions(integer permissions)
{
if (PERMISSION_TRIGGER_ANIMATION & permissions)
{
llWhisper(0,"Aproveite o verdadeiro pastel da feira! Sem gordura trans!"
;llPlaySound(sound, 1.0);
llStartAnimation(anim);
llStartAnimation(anim2);
llSetTimerEvent(15);
}
}
timer()
{
llStartAnimation(anim2);
llStartAnimation(anim);
}
}
THE PROBLEM:
When I (the creator) wear it, it works well (play the music and shows the message). But when other people wear it, neither the animations, sound or message works!
What can I do?
Hope you can help me!
Thanks
