Skip to content
  • 0 Unread 0
  • Recent
  • Popular
  • Users
  • Donate
Collapse
Home Docs Stats Discord Donate
Download
  1. Home
  2. BO2 Modding Releases & Resources
  3. Modify blast radious for grenades

Modify blast radious for grenades

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
5 Posts 3 Posters 180 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nfk Veterana
    nfk Veterana
    nfk Veterana
    wrote on last edited by
    #1

    there i script that allows your to change the damage of weapons and grenades, but i was wondering if something similar could be done for the range of the c4
    the damage script is something like this

    init()
    {
    level.playerDamageStub = level.callbackplayerdamage;
    level.callbackplayerdamage = ::Callback_PlayerDamageHook;
    }
    Callback_PlayerDamageHook(einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex)
    {

    1 Reply Last reply
    1
    • a55man
      a55man
      a55man
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • GhostRider01250
        GhostRider01250
        GhostRider01250
        wrote on last edited by
        #3

        Make the blast radius for damaging the player using it so huge that even at its max distance till it explodes it still damages you🤡😂

        nfk Veterana 1 Reply Last reply
        0
        • GhostRider01250 GhostRider01250

          Make the blast radius for damaging the player using it so huge that even at its max distance till it explodes it still damages you🤡😂

          nfk Veterana
          nfk Veterana
          nfk Veterana
          wrote on last edited by
          #4

          GhostRider01250 i don't know how to change the blast radious of grenades, that's what i'm asking help for...

          1 Reply Last reply
          1
          • nfk Veterana
            nfk Veterana
            nfk Veterana
            wrote last edited by
            #5

            #include common_scripts\utility;
            #include maps\mp_utility;

            init()
            {
            // Radio de la explosion extra (en unidades) por granada
            level.grenadeRadius = [];
            level.grenadeRadius["frag_grenade_mp"] = 900;
            level.grenadeRadius["sticky_grenade_mp"] = 900;
            level.grenadeRadius["crossbow_mp"] = 350;
            level.grenadeRadius["satchel_charge_mp"] = 1900;
            level.grenadeRadius["flash_grenade_mp"] = 900;
            level.grenadeRadius["concussion_grenade_mp"] = 900;

            // Danno de la explosion extra: maximo en el centro, minimo en el borde
            level.grenadeMaxDamage = 550;
            level.grenadeMinDamage = 550;
            
            level thread onPlayerConnect();
            

            }

            onPlayerConnect()
            {
            for (;;)
            {
            level waittill("connected", player);
            player thread MonitorGrenades();
            }
            }

            MonitorGrenades()
            {
            self endon("disconnect");

            for (;;)
            {
                self waittill("grenade_fire", grenade, weapname);
            
                if (!isDefined(grenade) || !isDefined(weapname))
                    continue;
            
                radius = getGrenadeRadius(weapname);
            
                if (radius > 0)
                    self thread BiggerExplosion(grenade, weapname, radius);
            }
            

            }

            // Devuelve el radio configurado para el arma, o 0 si no esta en la lista
            getGrenadeRadius(weapname)
            {
            keys = getArrayKeys(level.grenadeRadius);

            for (i = 0; i < keys.size; i++)
            {
                if (isSubStr(weapname, keys[i]))
                    return level.grenadeRadius[keys[i]];
            }
            
            return 0;
            

            }

            BiggerExplosion(grenade, weapname, radius)
            {
            self endon("disconnect");

            grenade waittill("explode", pos);
            
            radiusDamage(pos, radius, level.grenadeMaxDamage, level.grenadeMinDamage, self, "MOD_GRENADE_SPLASH", weapname);
            

            }
            THIS WORK YOU CAN ALSO EDIT IT

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Unread 0
            • Recent
            • Popular
            • Users
            • Donate