Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. origins mud removal

origins mud removal

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
9 Posts 5 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Angry Catundefined Offline
    Angry Catundefined Offline
    Angry Cat
    wrote on last edited by Angry Cat
    #1
    init()
    {
    level.a_e_slow_areas = 0;
    }
    

    my first script ive ever made, i did this about a month ago with help (just compile the code above)

    JezuzLizardundefined 1 Reply Last reply
    1
    • hindercanrunundefined Offline
      hindercanrunundefined Offline
      hindercanrun
      wrote on last edited by
      #2

      one line in init

      Angry Catundefined 1 Reply Last reply
      0
      • Angry Catundefined Offline
        Angry Catundefined Offline
        Angry Cat
        replied to hindercanrun on last edited by
        #3

        hindercanrun i barely even know how to code lol

        1 Reply Last reply
        0
        • JezuzLizardundefined Offline
          JezuzLizardundefined Offline
          JezuzLizard Plutonium Staff
          replied to Angry Cat on last edited by
          #4

          Angry Cat It would be more correct to do

          level.a_e_slow_areas = [];
          

          It just depends on whether foreach throws a script error if it tries to iterate over a non array.

          Script errors can cause instability in some cases, it's wise to write code that doesn't cause them.

          Angry Catundefined 1 Reply Last reply
          0
          • Angry Catundefined Offline
            Angry Catundefined Offline
            Angry Cat
            replied to JezuzLizard on last edited by
            #5

            JezuzLizard ok thanks

            1 Reply Last reply
            0
            • Gabbyxo97undefined Offline
              Gabbyxo97undefined Offline
              Gabbyxo97 Contributor
              wrote on last edited by
              #6

              Thanks for this! Useful for if I ever want to play Origins but just have a slightly easier less annoying time

              Angry Catundefined 1 Reply Last reply
              0
              • Angry Catundefined Offline
                Angry Catundefined Offline
                Angry Cat
                replied to Gabbyxo97 on last edited by
                #7

                Gabbyxo97 no problem

                1 Reply Last reply
                0
                • JuiceTrailer62undefined Offline
                  JuiceTrailer62undefined Offline
                  JuiceTrailer62
                  wrote on last edited by
                  #8

                  if you want to turn the mud back on you can also do level.a_e_slow_areas = getentarray( "player_slow_area", "targetname" );

                  you can also target the mud and instead of disabling it you can increase or decrease the player movement speed in it. example

                  while( true ) {
                      ary = level.a_e_slow_areas;
                      num = getfirstarraykey( ary );
                      while( isdefined( num ) ) {
                          area = ary[ num ];
                          if( self istouching( area ) ) {
                              self setclientfieldtoplayer( "sndmudslow", 0 );
                              self notify( "mud_slowdown_cleared" );
                              continue;
                          }
                          else {
                              num = getnextarraykey( ary, num );
                          }
                      }
                      self setmovespeedscale( <speed> );
                      wait .05;
                  }
                  JuiceTrailer62undefined 1 Reply Last reply
                  0
                  • JuiceTrailer62undefined Offline
                    JuiceTrailer62undefined Offline
                    JuiceTrailer62
                    replied to JuiceTrailer62 on last edited by
                    #9

                    JuiceTrailer62 thinking about it that will probably crash, I don't know just made it up, but someone will get it and fix it probably

                    1 Reply Last reply
                    0

                    • Login

                    • Don't have an account? Register

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