Jump to content

Walter Fanwood

  • Posts

  • Joined

  • Last visited

Everything posted by Walter Fanwood

  1. i actually didnt know you can get such scripts online since i got this script from a friend of mine inworld next to a free T3 weapon but its good to know there is the original online. :matte-motes-agape: @Rolig Loon So basicly insteed of this: collision_start(integer total_number) { llSetPrimitiveParams([PRIM_PHYSICS, FALSE]); llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); key id = llGetOwner(); key owner = llGetOwner(); if (id == owner) { } else { i should try....this...? collision_start(integer total_number) { llSetPrimitiveParams([PRIM_PHYSICS, FALSE]); llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); key id = llDetectedKey(0); key owner = llGetOwner(); if (id == owner) { } else { ...guess that should work
  2. where do i need to change that in the script? would be nice if you could show me a sample please :3 @ steph Arnott i got it without a headline. so i cant tell if it is the one who made it or not ^^;
  3. As i said i use a simple T3 weapon as sample integer clipSize = 12; // How many bullets you can fire before having to reload the gun. float reloadTime = 2.7; // How many seconds it will take to reload the gun when it is out of ammo.integer numRezSlaves = 0; // The number of "T3.Gun.free.rifle.rez" scripts in this gun. // Makes the ammo count correct.float velocity = 44.0; // The forward velocity of the bullets as they are fired. // SL cannot move things faster than 200 meters per second. integer auto = FALSE; // Is the gun fully automatic? If so, you can fire repeatedly by holding down the mouse button. // If not, you must click each time to fire.float accuracy = 0.5; // How the bullets will spread out as they move. 0.01 is almost nothing, 10 is HUGE. // Reccommend .05 to 5 // The bigger rez_spread, the more effect this number has. // LOWER is more accurate. float rez_spread = 0.1; // How the bullets will be spread out as they rez. // You need about 0.1 per "rez slave" script to minimize bullet collisions. vector rez_offset = <0.6,0,0>; // How far away from the center of your view in mouselook the bullets will rez. // +x = Forward // +y = Left // +z = Up integer delay = 0; // Only matters if the gun is not automatic. // The number of seconds between shots. integer listen_channel= 5; // A chat channel that the gun will listen to its owner for commands on. // Public chat will always work. string reticleName="tiny"; // T3 Ultimate Reticle HUD API: // This is the reticle/crosshair to show for someone wearing the T3 Ultimate Reticle HUD. // Leave this blank and the weapon will not override the users' existing reticle./// ====================/// Animations and Sounds/// ====================// To replace the animations and sounds, you can add the following inventory items to the gun:// Otherwise, default animations and sounds will be used.// ANIMATIONS:// reload.anim - when you're reloading// active.anim - when you're in mouselook// idle.anim - when you're not in mouselook// SOUNDS:// reload.sound - plays when you reload// fire.sound - plays when you fire, loops if "auto" is TRUE// safety.sound - plays when you try to fire while the safety is on./// ====================/// SCRIPT STUFF, you can ignore the stuff below this line./// ====================integer has_perms=FALSE;integer safety=FALSE;integer listen_handle;integer alt_listen_handle;integer notext=FALSE;integer activated;integer deactivated;integer ammoLeft;integer holstered;integer lastFireTime;integer desiredPerms;integer controlList;float usevel;integer useauto;integer damage=0;integer useclip;integer reloading=FALSE;string reload_anim="";string reload_sound="ad01461e-a54c-43ba-61b8-bd289f6b7ebd";string fire_sound="88026413-b829-0df2-0e57-8212227a652c";string safety_sound="f1c12ed9-7f5c-cb7f-9741-b940715b7e7e";string active_anim="aim_r_bazooka";string idle_anim="hold_r_bazooka";init(){ desiredPerms=(PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS | PERMISSION_TRACK_CAMERA); controlList=(CONTROL_ML_LBUTTON | CONTROL_DOWN | CONTROL_LEFT | CONTROL_ROT_LEFT | CONTROL_RIGHT | CONTROL_ROT_RIGHT); listen_handle=llListen(0,"",llGetOwner(),""); alt_listen_handle=llListen(listen_channel,"",llGetOwner(),""); safety=TRUE; notext=FALSE; ammoLeft=clipSize; lastFireTime=0; usevel=velocity; useauto=auto; useclip=clipSize; reloading=FALSE; request_permissions(llGetPermissions()); if(llGetInventoryType("reload.anim")!=INVENTORY_NONE) reload_anim="reload.anim"; if(llGetInventoryType("reload.sound")!=INVENTORY_NONE) reload_sound="reload.sound"; if(llGetInventoryType("fire.sound")!=INVENTORY_NONE) fire_sound="fire.sound"; if(llGetInventoryType("active.anim")!=INVENTORY_NONE) active_anim="active.anim"; if(llGetInventoryType("idle.anim")!=INVENTORY_NONE) idle_anim="idle.anim"; if(llGetInventoryType("safety.sound")!=INVENTORY_NONE) safety_sound="safety.sound"; holster();}fire(){ if(safety) { llPlaySound(safety_sound,1); return; } if(!holstered && ammoLeft >0) { vector spreadVector = <(0-(rez_spread/2)) + llFrand(rez_spread),(0-(rez_spread/2)) + llFrand(rez_spread),(0-(rez_spread/2)) + llFrand(rez_spread)>; // We offset the rezzing randomly, within rez_spread rotation rotBetween=llRotBetween(<0.01,0.01,0.01>,<0.01,0.01,0.01>+(DEG_TO_RAD*accuracy*(spreadVector*llGetCameraRot()))); // The rotation to look from DEAD CENTER to where we were rezzed... rotation modRot = llGetCameraRot() / <rotBetween.x*llPow(-1,llRound(llFrand(1))),rotBetween.y*llPow(-1,llRound(llFrand(1))),rotBetween.z*llPow(-1,llRound(llFrand(1))),rotBetween.s*llPow(-1,llRound(llFrand(1)))>; // We rotate to put us on a straight line in THAT direction. llRezAtRoot(llGetInventoryName(INVENTORY_OBJECT,0),llGetCameraPos() + (rez_offset + spreadVector)*llGetCameraRot(), llRot2Fwd(modRot)*usevel, modRot,damage); if(!auto) { lastFireTime=llGetUnixTime(); } ammoLeft -= 1; if(auto && useauto) ammoLeft-=numRezSlaves; if(ammoLeft<0) ammoLeft=0; setFloating(); if(ammoLeft<=0) { reload(); } }}request_permissions(integer perm){ has_perms=TRUE; if(perm != desiredPerms || llGetPermissionsKey() !=llGetOwner()) { has_perms=FALSE; llRequestPermissions(llGetOwner(),desiredPerms); }else { llTakeControls(controlList,TRUE,TRUE); } }string getTextString(){ if(safety) return "[ safety on ]"; string textString="[ " + (string)ammoLeft + " / " + (string)useclip + " ]\n"; if(auto) { if(useauto) { textString+="[ auto ]"; }else { textString+="[ semi ]"; } } return textString;} setFloating(){ if(!notext) { vector floatColor=<255,255,255>; if(!safety) { floatColor=<41,219,0>; if(ammoLeft<=useclip/3) { floatColor=<219,216,0>; }else if(damage<100) { floatColor=<86,185,255>; } } llSetText(getTextString(),floatColor/255.0,1); }}holster(){ safe(TRUE); llListenRemove(listen_handle); listen_handle=llListen(0,"",llGetOwner(),"draw"); llListenRemove(alt_listen_handle); alt_listen_handle=llListen(listen_channel,"",llGetOwner(),"draw"); llSetTimerEvent(0); llSetLinkAlpha(LINK_SET,0,ALL_SIDES); holstered=TRUE; if(has_perms) { llStopAnimation(idle_anim); llStopAnimation(active_anim); } llSetText("",<1,1,1>,1); }draw(){ llMessageLinked(LINK_SET,0,"uroverride", reticleName); llListenRemove(listen_handle); listen_handle=llListen(0,"",llGetOwner(),""); llListenRemove(alt_listen_handle); alt_listen_handle=llListen(listen_channel,"",llGetOwner(),""); llSetTimerEvent(1); llSetLinkAlpha(LINK_SET,1,ALL_SIDES); deactivated=FALSE; holstered=FALSE; safe(FALSE);}safe(integer t){ safety=t; llMessageLinked(LINK_SET,(integer)usevel,"velocity",""); llMessageLinked(LINK_SET,0,"rez_spread",(string)rez_spread); llMessageLinked(LINK_SET,0,"accuracy",(string)accuracy); llMessageLinked(LINK_SET,0,"rez_offset",(string)rez_offset); if((auto && useauto) || (auto && !useauto && safety) || !auto) llMessageLinked(LINK_SET,safety,"safety",""); llMessageLinked(LINK_SET,useauto,"auto",""); llMessageLinked(LINK_SET,delay,"delay",""); llMessageLinked(LINK_SET,damage,"damage",""); setFloating();}reload(){ if(ammoLeft==useclip || reloading) return; reloading=TRUE; if(!notext) llSetText("[ reloading ]",<255,60,0>/255.0,1); llStopSound(); llMessageLinked(LINK_SET,TRUE,"safety",""); llPlaySound(reload_sound,1); if(has_perms && reload_anim!="") { llStartAnimation(reload_anim); } llSleep(reloadTime); ammoLeft=useclip; if(!(auto && !useauto)) llMessageLinked(LINK_SET,FALSE,"safety",""); setFloating(); reloading=FALSE;}default{ state_entry() { init(); } attach(key id) { if(id!=NULL_KEY) { init(); llOwnerSay("Say 'draw' to draw me, then enter mouselook and click to fire."); } } run_time_permissions(integer perm) { request_permissions(perm); } listen(integer channgel, string name, key id, string message) { message==llToLower(message); if(message=="draw") { draw(); }else if(message=="holster" || message=="holst" || message=="sling") { holster(); }else if(message=="reload" || message=="r") { reload(); }else if(message=="safe" || message=="safety" || message=="safety on") { safe(TRUE); }else if(message=="unsafe" || message=="nosafe" || message=="safety off") { safe(FALSE); }else if(message=="notext" || message=="textoff" || message=="text off" || message=="no text") { notext=TRUE; llSetText("",<1,1,1>,1); }else if(message=="text" || message=="texton" || message=="text on") { notext=FALSE; safe(safety); }else if(message=="damage" || message=="db" || message=="d") { llOwnerSay("Damage Bullet selected. Does 0 LL damage."); damage=100; llMessageLinked(LINK_SET,damage,"damage",""); setFloating(); }else if(message=="training" || message=="tb" || message=="t") { llOwnerSay("Training Bullet selected. Does 1 LL damage."); damage=1; llMessageLinked(LINK_SET,damage,"damage",""); setFloating(); }else if(message=="a" || message=="auto" || message=="automatic" || message=="full auto") { if(auto && !useauto) { useauto=TRUE; llOwnerSay("Full Automatic firing mode selected."); llMessageLinked(LINK_SET,FALSE,"safety",""); setFloating(); } }else if(message=="s" || message=="semi" || message=="semiauto" || message=="single") { if(auto && useauto) { useauto=FALSE; llOwnerSay("Semi-Automatic firing mode selected."); llMessageLinked(LINK_SET,TRUE,"safety",""); setFloating(); } }else if(message=="version") { llWhisper(0,llGetScriptName()); }else { list parts = llParseString2List(message,[" ",".",":"],[]); string command = llList2String(parts,0); if(command=="vel" || command=="v" || command=="velocity") { integer newvel = (integer)llList2String(parts,1); if(newvel<=0) { usevel=velocity; }else { usevel = newvel; } llMessageLinked(LINK_SET,(integer)usevel,"velocity",""); llOwnerSay("Velocity: " + (string)((integer)usevel)); }else if(command=="ammo" || command=="clip" || command=="mag" || command=="m") { integer newclip = (integer)llList2String(parts,1); if(newclip<=clipSize && newclip>0) { useclip=newclip; }else { useclip=clipSize; } llOwnerSay("Magazine Size: " + (string)useclip + " rounds."); if(ammoLeft>useclip) ammoLeft=useclip; setFloating(); } } } control(key id, integer level, integer edge) { integer start = level & edge; integer end = ~level & edge; integer held = level & ~edge; integer untouched = ~(level | edge); if(!safety && ((held & CONTROL_LEFT) || (held & CONTROL_ROT_LEFT)) && ((held & CONTROL_RIGHT) || (held & CONTROL_ROT_RIGHT)) ) { reload(); } if(safety || (!auto && (llGetUnixTime()-lastFireTime)<delay ) ) return; if((start & CONTROL_ML_LBUTTON) && (untouched & CONTROL_DOWN) ) { if(useauto) { llLoopSound(fire_sound,1); }else { llTriggerSound(fire_sound,1); } fire(); } if( (held & CONTROL_ML_LBUTTON) && useauto && (untouched & CONTROL_DOWN)) { fire(); } if(end & CONTROL_ML_LBUTTON && (untouched & CONTROL_DOWN)) { if(useauto) llStopSound(); } } changed(integer change) { if(change & CHANGED_OWNER) { llResetScript(); } } timer() { if((llGetAgentInfo(llGetOwner()) & AGENT_MOUSELOOK) && !activated && !holstered) { llStopAnimation(idle_anim); llStartAnimation(active_anim); activated=TRUE; deactivated=FALSE; } else if(!(llGetAgentInfo(llGetOwner()) & AGENT_MOUSELOOK) && !deactivated && !holstered) { llStopAnimation(active_anim); llStartAnimation(idle_anim); deactivated=TRUE; activated=FALSE; } }} i also found sadly something wrong in my bullet script which is this part: collision_start(integer total_number) { llSetPrimitiveParams([PRIM_PHYSICS, FALSE]); llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); key id = llGetOwner(); key owner = llGetOwner(); if (id == owner) { } else { The problem is that i made the id and owner key getting only the llGetOwner, both will be the same "ID", so the bullets will never able to hit sadly. How can i change the Id key that it actually gets the id from the one who is hit (or like) so that the bullets actually react if they hit another person?
  4. i tried that but they still bounce pretty much off the walls before they stop...dang...(like it didnt helped very much)
  5. if you could tell me how i can change that in the right counter i guess i would do so ^^; i will not ruin something if i duno how to work with this LLComment which i barely understand
  6. I kinda did this already as i add the lines collision_start(integer total_number) { llSetPrimitiveParams([PRIM_PHYSICS, FALSE]); llSetPrimitiveParams([PRIM_PHANTOM, TRUE]);... but i guess its a reaction time which needs to long "loading" the full script. Or at least its not the right outcome, sadly. Still thanks.
  7. Its a bit hard to explain what i mean but i give it a try. Since i work on a own battle system i used a simple t3 weapon as "sample" and add the damage input into it. but becourse i dont wana hurt myself with the bullets (which sadly happend if i fired the gun and just run/walked forward) i tried something like this: integer channel =10; float force_amount = 0.0; default { state_entry() { llSetTimerEvent(65.0); llListen(channel,"",NULL_KEY,""); } on_rez(integer start_param) { llPreloadSound("c5643d12-6e74-fc47-e821-996b1059ec1c"); } collision_start(integer total_number) { llSetPrimitiveParams([PRIM_PHYSICS, FALSE]); llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); key id = llGetOwner(); key owner = llGetOwner(); if (id == owner) { } else { if (llDetectedType(0) & AGENT) { integer chan = -956535255; key target = llDetectedKey(0); string command = "DAMAGE"; string modifier = "5"; string sender = "Pistol Bullet"; llTriggerSound("c5643d12-6e74-fc47-e821-996b1059ec1c",0.8); llSay(chan, (string)target + " )( " + command + " )( " + modifier + " )( " + sender); llSetDamage(0); llPushObject(llDetectedKey(0), force_amount*llRot2Up(llGetRot()), ZERO_VECTOR, FALSE); llDie(); } } llDie(); } timer() { llDie(); } listen(integer channel, string name, key id, string message) { if(llGetOwner() == llGetOwnerKey(id)) { if(message =="Remove"); llDie(); } } } After all, the bullets sure dont hurt myself anymore, they still need a long time now to react - which means they bounce still of walls a long time before they finally dissappier. So my question is, how can i change it that the bullets well..."stay faster" at one place after they hit "something" (walls, enemys, maybe even myself) or is there a way to make it easier that my own bullets dont hurtmyself without changing the rez-place from the bullets to much (which i dont wana change coz i could "shot truh walls" if i let them rez to far from me - if you know what i mean)? Maybe someone can edit the parts for me, im not that good even if i really try hard ^^;
  8. Well im pretty much building along the last times in SL but i have a lil problem coz i really dont know how i could create that. I try to create some thing like a collecting hud, a simple one, like you collect coins or like. Let me explain myself what i tried but sadly failed. It sure is for a kind of game where the "Player" should collect a special number of, let me use as sample, Coins to win the game. So What i want (and i guess need...) is that this said Object reacts to the player and adds "1 Point" (as sample) to the hud the player is wearing. As example, try to image something like a simple Ring our coin counter from the Sonic or mario games. Thats kinda all i want. But insteed of numbers, i wana use textures which would be simple named by "Coin00" up to "Coin10" So everytime you collect such "coin" the counter should rise a number, so changing the texture by one ("Coin00","Coin01","Coin02" and so on). The object sure should disapier if you touched/collect it. If the player got 10 coints, the hud should say something like "You WIN!" and reset the counter after maybe 5 Seconds - same if you detach the hud that the counter resets to "0". I duno if thats possible but my scripting experience didnt helped me. I would be really thankful if someone may could help me with if not maybe even create this easy stuff/scripts (heh, said by the one who cant create them...<<; ) since textures are not a problem for me to create. Only this....both scripts (i think i need 2 coz one for the object to collect and one for the hud)....i really tried now 3 month but i gave up... -.-
  9. well dang it... still, thank you all for your help, it helped me still, somehow heh...
  10. Well yea that pretty much my problem and i tried a lot but nothing worked It sounds easy but i guess im just to dump to understand it XD So i wana click a object, as sample a button in a hud i create, which activates a simple gesture which NORMAL activates if you use the comment "/4heal self" (you might can see where i wana use it lol) Its not really a "gesture", since its a chat comment the user have to make that the Button script from the Hud button reacts but as i said i want that it also reacts by clicking it with another script in it (coz i need this script SOLO for something else maybe) but i guess if i create a gesture which will write that down in the chat if this possible than the button can active the gesture...well yea i guess i kinda need that script. EDIT: Yea i made a gesture which runs on the comment "/4heal self" but i still need that the object if you click it USES this gesture since it only works if i write down the comment and not by clicking the button.... So i really need some help, thank you in advance! If it helps, here the Script i use which the gesture active: key target; integer ready = TRUE; key owner; integer listening; integer cooldown = 25; integer QUERYchan = -156535255; integer HEALcost = -25; integer APIchan = -956535255; default { state_entry() { owner = llGetOwner(); llListen(4,"",owner,""); } timer() { llSetTimerEvent(0); ready = TRUE; llOwnerSay("BANDAGE ready"); } attach(key id) { if(id != NULL_KEY) { llResetScript(); } } listen(integer chan, string name, key id, string msg) { if(chan == QUERYchan) { list data = llCSV2List(msg); if(llList2Key(data,0) == owner) { if(llList2Integer(data,3) >= -HEALcost) { llTriggerSound("c4db9967-7986-1e49-9dee-c0775ae74b49",1.0); llSetTimerEvent(cooldown); ready = FALSE; llOwnerSay("Aiding "+llKey2Name(target)+"..."); llWhisper(APIchan,(string)owner + " )( AP )( "+(string)HEALcost+" )( first aid kit"); llSay(APIchan,(string)target + " )( HEAL )( 30 )( "+llKey2Name(owner)); llListenRemove(listening); } else { llOwnerSay("Not enough AP to aid!"); } } } else { if(ready == TRUE) { if(msg == "heal self") { target = owner; listening = llListen(QUERYchan,"","",""); llWhisper(APIchan,(string)owner + " )( QUERY"); } } else { llOwnerSay("Not ready for that..."); } } } sensor(integer number) { target = llDetectedKey(0); listening = llListen(QUERYchan,"","",""); llWhisper(APIchan,(string)owner + " )( QUERY"); } }
  11. I tried yours but its anyhow not working, meaning there is a error with the list. Anyways i fixed the "==" thing (thanks again!) and deleted some stuff so i made it working like this now key owner;vector defaultcolor = <0,1,0>;integer HP = 100;default{ state_entry() { owner = llGetOwner(); llListen(-156535255,"","",""); } attach(key id) { HP = 100; llSetTexture("HP00",ALL_SIDES); llResetScript(); } listen(integer chan, string name, key id, string msg) { list temp = llCSV2List(msg); if((llList2Key(temp,0) == owner) && (llList2String(temp,1) == "UPDATE")) {HP = (integer)llList2Integer(temp,2); } if(HP == 0) { llSetTexture("HP00",ALL_SIDES); } if(HP >= 1) { if(HP <= 10) { llSetTexture("HP01",ALL_SIDES); }} if(HP >= 11) { if(HP <= 20) { llSetTexture("HP02",ALL_SIDES); }} if(HP >= 21) { if(HP <=30) { llSetTexture("HP03",ALL_SIDES); }} if(HP >= 31) { if(HP <= 40) { llSetTexture("HP04",ALL_SIDES); }} if(HP >= 41) { if(HP <= 50) { llSetTexture("HP05",ALL_SIDES); }} if(HP >= 51) { if(HP <= 60) { llSetTexture("HP06",ALL_SIDES); }} if(HP >= 61) { if(HP <= 70) { llSetTexture("HP07",ALL_SIDES); }} if(HP >= 71) { if(HP <= 80) { llSetTexture("HP08",ALL_SIDES); }} if(HP >= 81) { if(HP <= 90) { llSetTexture("HP09",ALL_SIDES); }} if(HP >= 91) { if(HP <= 100) { llSetTexture("HP10",ALL_SIDES); }} }}
  12. I tried lately to make a easy HP HUD for a fight system its based on the problem is anyhow i made somewhere a misstake i guess with the >/< stuff here the script i use, its normaly a easy texture based HUD, the textures are not missing or something but it will not change anything (texture wise): key owner; vector defaultcolor = <0,1,0>; integer HP; default { state_entry() { owner = llGetOwner(); llListen(-156535255,"","",""); } attach(key id) { llResetScript(); } listen(integer chan, string name, key id, string msg) { list temp = llCSV2List(msg); if((llList2Key(temp,0) == owner) && (llList2String(temp,1) == "UPDATE")) { string HP = llList2String(temp,2); } if((llList2Key(temp,0) == owner) && (llList2String(temp,1) == "UPDATE")) { if(HP = 0) { llSetTexture("HP00",ALL_SIDES); } if(HP >= 0) { if(HP <= 9) { llSetTexture("HP01",ALL_SIDES); } } if(HP >= 10) { if(HP <= 19) { llSetTexture("HP02",ALL_SIDES); } } if(HP >= 20) { if(HP <= 29) { llSetTexture("HP03",ALL_SIDES); } } if(HP >= 30) { if(HP <= 39) { llSetTexture("HP04",ALL_SIDES); } } if(HP >= 40) { if(HP <= 49) { llSetTexture("HP05",ALL_SIDES); } } if(HP >= 50) { if(HP <= 59) { llSetTexture("HP06",ALL_SIDES); } } if(HP >= 60) { if(HP <= 69) { llSetTexture("HP07",ALL_SIDES); } } if(HP >= 70) { if(HP <= 79) { llSetTexture("HP08",ALL_SIDES); } } if(HP >= 80) { if(HP <= 89) { llSetTexture("HP09",ALL_SIDES); } } if(HP >= 90) { if(HP <= 101) { llSetTexture("HP10",ALL_SIDES); } } } } } Can maybe someone fix it for me? would be nice coz i kinda freaked out. I guess that </> stuff kinda blowed my mind ^^; before someone ask, the orignal its based on, its just a hover text HUD which looks like this (and yea this one actually works) key owner; vector defaultcolor = <0,1,0>; default { state_entry() { owner = llGetOwner(); llListen(-156535255,"","",""); llSetText("Turn on your Spy Meter to show status",<1,1,1>,1.0); } attach(key id) { llResetScript(); } listen(integer chan, string name, key id, string msg) { list temp = llCSV2List(msg); if((llList2Key(temp,0) == owner) && (llList2String(temp,1) == "UPDATE")) { llSetText("Spy Status\n"+llList2String(temp,2)+" HP / "+llList2String(temp,3)+" AP",defaultcolor,1.0); } } }
  13. so how can i fix this insteed? (just as edit: im a total noob in scripting...)
  14. now it replays (endless...) " Heard <SPY FIGHT SYS 1.00A< say >d506d76d-8ddf-430a-b0e7-e78a57699104,UPDATE,100,100< " I also god a notecard where i add the "armor state" to it, maybe it helps a bit further API Commands Global API Channel - (v2.0): -956535255 SYNTAX: targetUUID )( command )( modifier )( sendername EXAMPLE: fe0f105a-3a2a-4d70-ad1e-6cac0da5388d )( damage )( 10 )( Lava flow COMMANDS: heal armor (only for armor you can wear) ap (use negatives to take away AP) damage (requires sender) stun (Does not need mod or sender to work) slow (Does not need mod or sender to work) message (Message in modifier) QUICK DROP SCRIPT: (Heal example. Mod for fast API scripts) integer chan = -956535255; key target = llDetectedKey(0); string command = "HEAL"; string modifier = "25"; string sender = "Stimpack"; llSay(chan, (string)target + " )( " + command + " )( " + modifier + " )( " + sender);
  15. Well as i said, i created a script but my problem is that does not reset with the hud i use for, i tried to fix it but i gave up, only add the things i need but i cant get it. the problem i have is that if im dead, it does not reset, either if i reset my hud. so i duno if it could be fixed here but i give it out as info. key owner; vector defaultcolor = <0,1,0>; integer used = 0; default { state_entry() { integer used = 0; owner = llGetOwner(); llListen(-156535255,"","",""); llSetText("Turn on your Meter!",<1,1,1>,1.0); } attach(key id) { llResetScript(); } listen(integer chan, string name, key id, string msg) { list temp = llCSV2List(msg); if((llList2Key(temp,0) == owner) && (llList2String(temp,1) == "UPDATE")) { if((integer)used == 0) { integer chan = -956535255; key target = llDetectedKey(0); string command = "ARMOR"; string modifier = "2"; string sender = "Ribbon"; llOwnerSay("Your Armor increase by 2!"); llTriggerSound("BUFF",0.8); llSay(chan, (string)target + " )( " + command + " )( " + modifier + " )( " + sender); llSetText("",defaultcolor,1.0); used = 1; llSleep(1.0); } } } } also maybe that helps: the comment to turn the hud on is /9on off its /9off
  16. 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
  17. thanks ^^ it works pretty well and i fix and update the system right now, i only need a simple melee script now and i guess i can give the last fixes and updates at the system pretty well :3
  18. 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); } }
  19. the problem is i only made so far samples which just "work with it". next to this i got now someoen already working with me who understood what i need :3 thanks to the person ^^
  20. well kinda maaaybe i duno but i found a base so far but i have some problems with still... here the base (i already changed a bit) // :CATEGORY:Combat// :NAME:Improved_Combat_System// :AUTHOR:shesuka// :CREATED:2013-03-06 12:40:30.970// :EDITED:2013-09-18 15:38:55// :ID:398// :NUM:554// :REV:1.0// :WORLD:Second Life// :DESCRIPTION:// An updated combat system.// // I have changed a great deal in this script. Please refer to the original version to see the changes.// // Also i use the name HUD when referring to the cs as I am used to scripting combat systems that have a full HUD setup. Even though this system has no HUD so to speak i will be using HUD as a reference to this system.// Based on <a href="http://www.outworldz.com/cgi/freescripts.plx?ID=1430">http://www.outworldz.com/cgi/freescripts.plx?ID=1430</a>// :CODE:// This script is free for use, and may be set with any perms you wish, and even sold; it is only to be sold if it is modified. Under no circumstances should you sell this free and opensource code to anyone, beyond the basic 1L for 'gift-item' purposes. This original code should remain full-perms unless modified.// THIS SYSTEM CAN SHOULD BE PLACED IN A PRIM FLOATING ABOVE THE HEADstring csName = "[sFS - Test]";//Displays the name of your Combat System in floating text. So your system entry for this line may look something like string csName = "[THE FUNKY COMBAT SYSTEM]";integer chan = 4; //Defining this as 4 means that the player can use the various commands for the HUD on channel 4.integer health = 100; //Your standard Health Amount.integer healthMax = 100; //Your maxmimum Health Amount.integer resist = 0; //Resistance to damage taken.vector color = <1,1,1>; //Colour of the CS Text above the head.integer healthInc = 5; //Time between each health regeneration.string customTitle = "Unamed Player"; //Your own custom title or name that users can set to be displayed in the overhead text via one of the new commands i added.key user; //Key of person playing (DONT EDIT).integer deathStatus = 0; //If 1 then dead, else not dead. Used in the timer to let the timer know that if the status is 1 then revive and re set status to 0 (DONT EDIT).integer hudStatus = 0; //If 1 then HUD is activate else HUD is in offline mode (DONT EDIT).string statusText = "HUD OFFLINE"; //To be displayed in the overhead text if hud is online this will be changed later in the script (DONT EDIT).setStatusText(){ llSetText(csName + "\n" + "Health : " + (string)health + " / " + (string)healthMax + "\n" + "ARMOR : " + (string)resist + "\n" + customTitle + "\n" + statusText, color, 1.0);} default{ attach(key attached){ if(attached == NULL_KEY){ llSay(0, (string)llKey2Name(user) + " has detached their " + (string)csName); //Says this on channel 0 if they detatch "Shesuka Resident has detached their FUNKY COMBAT SYSTEM }else{ hudStatus = 0; //On attach the HUD is off by default. statusText = "HUD OFFLINE"; //On attach HUD displays it is off by default. user = llGetOwner(); //Defines the user variable from above as the owners key. Reason i did this is it means you do not have to reset each time a new owner is given the HUD. llRequestPermissions(user, PERMISSION_TRIGGER_ANIMATION); //Requests the users permissions to play animations. llListen(chan, "", user, ""); //Listen on the channel chan and only to the user. setStatusText(); //Our global status variable. The handy thing about global variables is i only need to write llSetText once at the top of the script and then i can just user setStatusText(); instead of writing out the full set text line each time. llOwnerSay("Welcome to the " + (string)csName + ". " + "Please type /4help for a list of commands to help you activate and use this system"); //Tells the user on attach what to do and gives them a welcome message. } } listen(integer channel, string name, key id, string message){ if(channel == chan){ if(id == user){ if(message == "help"){ //Displays the list of commands you can do with this system. llOwnerSay("Command for this System are typed onto channel " + (string)chan + " and are as follows : " + "\n" + "1. To activate the system type : /4on" + "\n" + "2. To deactivate the system type : /4off" + "\n" + "3. To change your title/name type : /4title (name) so for example you might type..../4title THE GREAT BASINGA...." + "\n" + "4. To change your Overhead Text color type : /4color (vector colour) so for example you might type..../4color <1,0,0>....which would set the overhead text to red."); }else if(message == "on"){ hudStatus = 1; //Set to 1 as HUD is on. Setting as 1 and 0 is the same as using TRUE and FALSE. statusText = "IN ACTION"; //Sets the HUD text status to "HUD ONLINE". setStatusText(); //Again calling this global function to update the overhead text to show the HUD is online. llOwnerSay((string)csName + " is now ready to fight!"); //Telling player the HUD is online }else if(message == "off"){ hudStatus = 0; //Set to 0 as HUD is now off. statusText = "OCC"; //Sets the HUD text status back to "HUD OFFLINE". setStatusText(); //Now calling to update the overhead text to display the offline status of the HUD. llOwnerSay((string)csName + " left the fight!"); //Telling player the HUD is offline. }else if(llGetSubString(message, 0,4) == "title"){ //checking if the first five letters of the message say title. if(llGetSubString(message, 5,-1) != ""){ //Checking if letters 5 to the last letter do not equal nothing. customTitle = llGetSubString(message, 5,-1); //Assign letters 5 to end (name etc) as the new title. llOwnerSay("You have changed your title to " + customTitle + "."); //Telling the user that their name is successfully changed. setStatusText(); //Update overhead text to display new name. } }else if(llGetSubString(message, 0,6) == "color"){ //If the first 7 letters say color. if(llGetSubString(message, 7,-1) != ""){ //if letters/symbols etc etc 7 to end do not equal nothing. color = (vector)llGetSubString(message, 7,-1); //Set the new color of the overhead text as whatever colour is set from 7 to end in the message. setStatusText(); //Update new color to overhead text. } }else{ llOwnerSay("Unknown command please try again"); //If a help command is entered wrongly then it will display this message. } } } } collision_start(integer num){ if(hudStatus == 0)return; if(llDetectedType(0) == AGENT_BY_LEGACY_NAME)return;//if the detected object is an agent then do not go any further. integer damage = llRound(llVecMag(llDetectedVel(0))/resist); health -= damage;//Health is minus the bullet velocity divided by the resist and then the damage is taken off the health. setStatusText(); //Update over head text to display new health. llSetTimerEvent(10); //Instead of having individual times and multiple timers as this is a script for beginners we are going to use a default value of 10 for all timers. This one will increase health. if(health <= 0){ deathStatus = 1; //As status now equals 1 llShout(0, (string)llKey2Name(user) + " has been KILLED!"); //Announce players death. llStartAnimation("death"); health = 0; //so if health is reduced to below 0 this will automatically make health equal 0 so you don't go into negative numbers. setStatusText(); //update new health to overhead text. llSetTimerEvent(20); //This will start the timer again at 10 seconds but with the deathStatus added this will also deal with how long you stay dead for. } } timer(){ if(health < healthMax){//If health is less than the max health available. health += 2; //So every 10 seconds add 20 health. if(health > healthMax){ //Checking if health is greater than healthMax. health = healthMax; //If so health is equal healthMax. } setStatusText(); //update health regain to overhead text. }else if(deathStatus == 1){ //if death status is true (1). llStopAnimation("death"); //stop the death animation. llOwnerSay("Youre back for action!"); //alert the player. } }} the problem i have is - if i am dead i anyhow stay death, i duno how to fix that coz i only wana be 20 seconds "death" and not the whole game - the problem is that this system is running on "velocity", its hard this system could work on Melee or trap weapons, i duno how i could change that maybe... - i still can move if im "dead" also i can (sadly) still us my weapons Maybe someone can now help me with it, at least the base is there...
  21. As i already told/asked/like in my other thread Here Im looking for someone who could help me/creating those scripts for that what i try to create. If someone would be intressted you also can contact me INWORLD best. Of course you can maybe help me here in the thread i linked too. I know its a lot of work and i know i need scripts (at least) for a "Hud" the "weapons" (like for the traps, melee and guns), the maybe medikit and the armors. Only the base is set so far but all stuff like textures and inworld building would i do all myself of course - im just a noob in scripting and it would be nice someone could help me with at least... thankis in advance.
  22. i try to work on something so that people maybe have a better view of that i am talking about, its just a sample and i duno if that works ^^; integer health = 100;integer Armor = 0;integer damage = 0;integer LostHP = 0;integer Dmgtaken = 0;integer regena = 2;integer action = 1;vector color = <0.498, 0.859, 1.000>;default{ state_entry() { llSetText("HP: " + (string)Health \n "Armor: " (string)Armor \n "DMG: " + (string)damage \n "Healratio: " + (string)regena, color, 1.0); } llCollisionFilter("ACTIVE WEAPON PRIM NAME HERE","",TRUE); { collision_start(integer total_number) { LostHP == ( HERE I NEED NOW THE INFO HOW TO GET THE DAMAGE FROM THE OTHER PLAYER - (string)Armor ); if(LostHP < 1) = 0; health -= (string)LostHP; llOwnerSay("DAMAGE TAKEN! " + (string)LostHP); if(health < 30) { color = <1,0,0>;} if(health < 0) llWhisper(0, " llGetDisplayName(llGetOwner) DIED!"); So let me explain the integers Health should be the HP which should be 100 and not more. Armor is the Shield-effect you should get from dresses which will work with the system (i come to this later). Damage is the own dmg you will make from the melee weapons, guns and traps should also get this dmg but has their own Damage integers set (i duno how). LostHP will be the integer which should calculate the differance between the Dmg you will take (integer "Dmgtaken") - the armor you have. DmgTaken is a integer which should get the info how much/high the Integer "Damage" is from your enemy or the traps/gun shots. it also will be used to calculate the integer "LostHP". the regena integer should work passive anyhow that this integer will add Health back, (as sample, every 10seconds your Health adds + (string)regena). the action integer should work for the weapons, it should be turned OFF as soon as the player reaches ZERO Health, so that weapons are "turned off". the integer should be set back to 1 as soon as the player is back "alive". I hope that helped a bit. im sorry im not good with scripts ><; still i tried my best to explain and wrote a bit...
  23. I also tried it and it was not that what i was looking. I mean i just "die" if i touch something heh but of course thank you very much i was looking more like something If player gets hit by X weapon which makes Y dmg - Z Armor, he loses W health. you know? :3
  24. hm the base is nice the problem i have is can i add somehow a armor system in that (as i told)?
  • Create New...