{"id":472,"date":"2010-09-14T11:53:49","date_gmt":"2010-09-14T04:53:49","guid":{"rendered":"http:\/\/narguslab.com\/press\/"},"modified":"2023-05-12T03:11:17","modified_gmt":"2023-05-11T20:11:17","slug":"script-pounce-recipient","status":"publish","type":"page","link":"http:\/\/narguslab.com\/press\/nargus-api\/script-pounce-recipient\/","title":{"rendered":"SCRIPT: Pounce Recipient"},"content":{"rendered":"<p>Script below allow your avatar to receive pounce action from Nargus S-2 Raptor actions. Please contact Nargus Asturias for animation found within the script.<\/p>\n<h2>Associated Animation Loader<\/h2>\n<pre>integer associateChannel = 14352;\r\n\r\nlist actionAnimations = [\r\n    \"_Get Pounced\", \"Get Pounced\"\r\n];\r\n\r\n\/\/ Variables\r\nkey owner;\r\n\r\nlist runningAnims;                  \/\/ List of all animations started by script\r\n\r\nrunAnimation(string name){\r\n    llStartAnimation(name);\r\n    if(llListFindList(runningAnims, [name]) &lt; 0) runningAnims += [name];\r\n}\r\n\r\nstopAnimation(string name){\r\n     if(name == \"\") return;\r\n\r\n     llStopAnimation(name);\r\n\r\n     \/\/ Update running animations list\r\n     integer index = llListFindList(runningAnims, [name]);\r\n     if(index &gt;= 0) runningAnims = llDeleteSubList(runningAnims, index, index);\r\n}\r\n\r\ndefault{\r\n    state_entry(){\r\n        owner = llGetOwner();\r\n\r\n        if(llGetAttached())\r\n            llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);\r\n    }\r\n\r\n    on_rez(integer start_param){\r\n        llResetScript();\r\n    }\r\n\r\n    run_time_permissions(integer perm){\r\n        if(perm == (PERMISSION_TRIGGER_ANIMATION))\r\n            state Ready;\r\n        else llOwnerSay(\"Permission failed. Script halted.\");\r\n    }\r\n}\r\n\r\nstate Ready{\r\n    state_entry(){\r\n        runningAnims = [];\r\n        llListen(associateChannel, \"\", NULL_KEY, \"\");\r\n    }\r\n\r\n    attach(key id){\r\n        if(id == NULL_KEY){\r\n            integer count = llGetListLength(runningAnims);\r\n            integer i;\r\n            for(i=0; i&lt; 0) return;\r\n        string anim = llList2String(actionAnimations, index+1);\r\n\r\n        if(cmd == \"RUN_ANIM\")       runAnimation(anim);\r\n        else if(cmd == \"STOP_ANIM\") stopAnimation(anim);\r\n    }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Script below allow your avatar to receive pounce action from Nargus S-2 Raptor actions. Please contact Nargus Asturias for animation found within the script. Associated Animation Loader integer associateChannel = 14352; list actionAnimations = [ &#8220;_Get Pounced&#8221;, &#8220;Get Pounced&#8221; ]; \/\/ Variables key owner; list runningAnims; \/\/ List of all animations started by script runAnimation(string [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":19,"menu_order":75,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false},"jetpack_shortlink":"https:\/\/wp.me\/P1wzps-7C","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/narguslab.com\/press\/wp-json\/wp\/v2\/pages\/472"}],"collection":[{"href":"http:\/\/narguslab.com\/press\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/narguslab.com\/press\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/narguslab.com\/press\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/narguslab.com\/press\/wp-json\/wp\/v2\/comments?post=472"}],"version-history":[{"count":4,"href":"http:\/\/narguslab.com\/press\/wp-json\/wp\/v2\/pages\/472\/revisions"}],"predecessor-version":[{"id":477,"href":"http:\/\/narguslab.com\/press\/wp-json\/wp\/v2\/pages\/472\/revisions\/477"}],"up":[{"embeddable":true,"href":"http:\/\/narguslab.com\/press\/wp-json\/wp\/v2\/pages\/19"}],"wp:attachment":[{"href":"http:\/\/narguslab.com\/press\/wp-json\/wp\/v2\/media?parent=472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}