Dance Animation

1. A single animation

Script:
default
{
state_entry()
{

}

touch_start(integer total_number)
{
llRequestPermissions(llDetectedKey(0),PERMISSION_TRIGGER_ANIMATION);
}

run_time_permissions( integer perm )
{
if(PERMISSION_TRIGGER_ANIMATION & perm)
{
llStartAnimation("Dance - Horizon Loop");
}

}
}

2. A choice of dances

Copy and paste the script:
list dances = ["Horizon","Kick"];
string dance_chosen;
key avatar;

default
{
state_entry()
{

}

touch_start(integer total_number)
{
avatar = llDetectedKey(0);
llDialog(avatar,
"Choose a Dance",
dances,
11);

llListen(11,"",NULL_KEY,"");
}

listen(integer channel,
string name,
key id,
string message)
{
dance_chosen = message;
llRequestPermissions(avatar,
PERMISSION_TRIGGER_ANIMATION);
}

run_time_permissions( integer perm )
{
if(PERMISSION_TRIGGER_ANIMATION & perm)
{
llStartAnimation(dance_chosen);
}

}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s