Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- default
- {
- state_entry()
- {
- llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
- }
- run_time_permissions(integer perm)
- {
- if(perm & PERMISSION_TRIGGER_ANIMATION)
- {
- state notTyping;
- }
- }
- state_exit()
- {
- llSetTimerEvent(0.05);
- }
- }
- state notTyping
- {
- timer()
- {
- if(llGetAgentInfo(llGetOwner()) & AGENT_TYPING)
- {
- llStartAnimation("CustomTypingAnimation");
- llTriggerSound("CustomTypingSound", 1.0);
- state typing;
- }
- }
- }
- state typing
- {
- timer()
- {
- if(!(llGetAgentInfo(llGetOwner()) & AGENT_TYPING))
- {
- llStopAnimation("CustomTypingAnimation");
- state notTyping;
- }
- }
- }
Add Comment
Please, Sign In to add comment