Walter Fanwood Posted August 17, 2015 Share Posted August 17, 2015 As the title says, i just need a simple(r) weapon script which should work like this :3 -play one special animation-shots/places a "dmg" dealing prim all i got so far is something like this but it doenst "shoot"/"place" one of this dmg dealing prims. I know it gives such systems outthere and it would be nice if someone could send me maybe here a copy or add/fix this script a bit, would be nice. Thank you all in advance. integer pointersound = 0; integer pointeranim = 0; list animations = [ ]; list sounds = [ ]; string anim; default { state_entry() { if(llGetAttached()) llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION); integer i; integer m = llGetInventoryNumber(INVENTORY_SOUND); for(i=0; i<m; i++) { sounds += [llGetInventoryName(INVENTORY_SOUND,i)]; } m = llGetInventoryNumber(INVENTORY_ANIMATION); for(i=0; i<m; i++) { animations += [llGetInventoryName(INVENTORY_ANIMATION,i)]; } } on_rez(integer sp) { llResetScript(); } run_time_permissions(integer perm) { if(perm & PERMISSION_TAKE_CONTROLS) { llTakeControls(CONTROL_LBUTTON,TRUE,TRUE); } } changed(integer change) { if(change & CHANGED_INVENTORY) llResetScript(); } control(key id,integer level,integer edge) { if(edge & level & CONTROL_LBUTTON) { if(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) { anim = llList2String(animations,pointeranim); if(anim != "") { llStartAnimation(anim); llSetTimerEvent(2.0); } if(pointeranim < llGetListLength(animations)) pointeranim++; else pointeranim=0; } string name = llList2String(sounds,pointersound); if(name != "") llTriggerSound(name,1.0); if(pointersound < llGetListLength(sounds)) pointersound++; else pointersound=0; } } timer() { llSetTimerEvent(0.0); llStopAnimation(anim); } } Link to comment Share on other sites More sharing options...
Profaitchikenz Haiku Posted August 17, 2015 Share Posted August 17, 2015 I think you've only got part of the system there, becauses there's nothing in there which rezzes an object, or aquires a target. If this is part of a linkset youlre working on,. look through the rest of the prims for more scripts. Link to comment Share on other sites More sharing options...
Walter Fanwood Posted August 17, 2015 Author Share Posted August 17, 2015 i know this script only plays the animations thats why i need now the command that it actually rezes a prim if it plays the animation :c Link to comment Share on other sites More sharing options...
Profaitchikenz Haiku Posted August 17, 2015 Share Posted August 17, 2015 Have a look in the wiki at llRezObject, it is the starting point for what you want to do. Link to comment Share on other sites More sharing options...
Walter Fanwood Posted August 18, 2015 Author Share Posted August 18, 2015 thanks! :3 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now