Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lower Aku Rangedamage
#1
The Aku make to much dmg on range. I coded something, but i'm not sure if this is going to work. Can somebody with knowlege test this?

Edit: Syntax Error :/ Need some help pls. I'm a NOOB -.-

I put this code in the globallogic_player file

Quote: range = distance(self.origin, eAttacker.origin);

if(range >= 1500 && ( isSubStr(sWeapon, "ak47u"))
{
iDamage = 35 - (-0.01 * range)
}else if(range < 1500 && ( isSubStr(sWeapon, "ak47u"))
{
iDamage = 35
}


i have found this in an MW2 Modding community. This is allready working in mw2, so it must be possible to use it in bo somehow

Quote:range = distance(self.origin, eAttacker.origin);

if (range > 1500 && range < 2000 && ( isSubStr(sWeapon, "ak47_mp") ) {

if(isSubStr(sWeapon, "ak47_mp")) {
switch( sHitLoc )
{
case "helmet":
case "head":
iDamage = (-0.028*range+98)*1.4;
break;
case "neck":
case "torso_upper":
case "torso_lower":
case "right_arm_upper":
case "left_arm_upper":
case "right_arm_lower":
case "left_arm_lower":
case "right_hand":
case "left_hand":
case "right_leg_upper":
case "left_leg_upper":
case "right_leg_lower":
case "left_leg_lower":
case "right_foot":
case "left_foot":
iDamage = -0.028*range+98;
break;
case "gun":
iDamage = 0;
break;
}
}
Reply

#2
What's your whole function ? I'm guessing that's only part of it.

Also, the weapon name would be ak74u_mp
Reply

#3
nvm
nvm
nvm
[Image: MaEIQ.png]
Reply

#4
(06-09-2011, 15:29)XeroK Wrote: What's your whole function ? I'm guessing that's only part of it.

Also, the weapon name would be ak74u_mp


i placed this in the Callback_PlayerDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
{

function



the question is if the self var is global and if there is a function called distance and what file you must include for it ^^

i think the file include for distance is missing at the start ?? Huh
Reply

#5
is there a responsibility to create the range var first? like float range; or something? _
Reply

#6
/SOLVED

i have the working code now. i post it later or tomorrow. atm i'm rewriting the code to make it esl-rules like. python speedreloader is also inc. Smile

- the sniper has some sway again because it was to nooblike without it.
- rounds up to 24 change by 12
- defusetime 7.5
- roundtime 2.35
- maxfps down to 125 to prevent fpsdrops/lagg

and so on

the bomb plant and defusesound needs much more range!!! any ideas?
Reply

#7
Here is some Code, but the sHitLoc thing isn't working atm. damn thing /ragemod on Angry
Code:
// Range Var

      range = int(distance(self.origin, eAttacker.origin));


// Aku Dmg modify

    if(range <= 3000 && range > 0 && (isSubStr(sWeapon, "ak47u_")))
    {
      /* switch( sHitLoc )
    {
    case "helmet":
    case "neck":
    case "head":
        iDamage = 85 + RadomIntRange(0, 18);
        break;
    case "torso_upper":
    case "torso_lower":
    case "right_arm_upper":
    case "left_arm_upper":
    case "right_arm_lower":
    case "left_arm_lower":
    case "right_leg_upper":
    case "left_leg_upper":
    case "right_leg_lower":
    case "left_leg_lower":*/
        iDamage = range / 300 + 35;
    /*    break;
    case "right_hand":
    case "left_hand":
    case "right_foot":
    case "left_foot":
        iDamage = 10;
        break;
    case "gun":
        iDamage = 0;
        break; */
    }else
    if(range > 3000 && (isSubStr(sWeapon, "ak47u_")))
    {
    /* case "helmet":
    case "neck":
    case "head":
        iDamage = 65 + RadomIntRange(0, 10);
        break;
    case "torso_upper":
    case "torso_lower":
    case "right_arm_upper":
    case "left_arm_upper":
    case "right_arm_lower":
    case "left_arm_lower":
    case "right_leg_upper":
    case "left_leg_upper":
    case "right_leg_lower":
    case "left_leg_lower": */
        iDamage = 24;
        /* break;
    case "right_hand":
    case "left_hand":
    case "right_foot":
    case "left_foot":
        iDamage = 5;
        break;
    case "gun":
        iDamage = 0;
        break; */
    }

//AK Headshot does more Dmg

  /* if(range <= 3000 && range > 0 && (isSubStr(sWeapon, "ak47_")))
    {
      switch( sHitLoc )
    {
    case "helmet":
    case "neck":
    case "head":
        iDamage = 95 + RadomIntRange(0, 20);
        break;
    case "torso_upper":
    case "torso_lower":
    case "right_arm_upper":
    case "left_arm_upper":
    case "right_arm_lower":
    case "left_arm_lower":
    case "right_leg_upper":
    case "left_leg_upper":
    case "right_leg_lower":
    case "left_leg_lower":
        iDamage = range / 300 + 40;
        break;
    case "right_hand":
    case "left_hand":
    case "right_foot":
    case "left_foot":
        iDamage = 10;
        break;
    case "gun":
        iDamage = 0;
        break;
    }else
    if(range > 3000 && (isSubStr(sWeapon, "ak47u_")))
    {
    case "helmet":
    case "neck":
    case "head":
        iDamage = 95 + RadomIntRange(0, 10);
        break;
    case "torso_upper":
    case "torso_lower":
        iDamage = 35;
        break;
    case "right_arm_upper":
    case "left_arm_upper":
    case "right_arm_lower":
    case "left_arm_lower":
    case "right_leg_upper":
    case "left_leg_upper":
    case "right_leg_lower":
    case "left_leg_lower":
        iDamage = 30;
        break;
    case "right_hand":
    case "left_hand":
    case "right_foot":
    case "left_foot":
        iDamage = 5;
        break;
    case "gun":
        iDamage = 0;
        break;
    } */


head vs. desk -.- forget the damn switch( ) behind the new if ( ) sometimes i wanna punch myself in the face Big Grin
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Lower the footsteps volume? j6k4 5 2,578 12-05-2010, 21:02
Last Post: j6k4

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.