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.2k 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.
  • undefined Offline
    undefined Offline
    Angry Cat
    wrote on Jan 8, 2023, 5:04 AM last edited by Angry Cat Jan 8, 2023, 7:04 AM
    #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)

    undefined 1 Reply Last reply Jan 8, 2023, 7:11 AM
    1
    • undefined Offline
      undefined Offline
      hindercanrun
      wrote on Jan 8, 2023, 5:59 AM last edited by
      #2

      one line in init

      undefined 1 Reply Last reply Jan 8, 2023, 6:45 AM
      0
      • undefined Offline
        undefined Offline
        Angry Cat
        replied to hindercanrun on Jan 8, 2023, 6:45 AM last edited by
        #3

        hindercanrun i barely even know how to code lol

        1 Reply Last reply
        0
        • undefined Offline
          undefined Offline
          JezuzLizard Plutonium Staff
          replied to Angry Cat on Jan 8, 2023, 7:11 AM 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.

          undefined 1 Reply Last reply Jan 8, 2023, 7:18 AM
          0
          • undefined Offline
            undefined Offline
            Angry Cat
            replied to JezuzLizard on Jan 8, 2023, 7:18 AM last edited by
            #5

            JezuzLizard ok thanks

            1 Reply Last reply
            0
            • undefined Offline
              undefined Offline
              Gabbyxo97 Contributor
              wrote on Jan 11, 2023, 8:29 AM 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

              undefined 1 Reply Last reply Jan 11, 2023, 9:39 AM
              0
              • undefined Offline
                undefined Offline
                Angry Cat
                replied to Gabbyxo97 on Jan 11, 2023, 9:39 AM last edited by
                #7

                Gabbyxo97 no problem

                1 Reply Last reply
                0
                • undefined Offline
                  undefined Offline
                  JuiceTrailer62
                  wrote on Jan 12, 2023, 12:47 AM 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;
                  }
                  undefined 1 Reply Last reply Jan 12, 2023, 2:02 AM
                  0
                  • undefined Offline
                    undefined Offline
                    JuiceTrailer62
                    replied to JuiceTrailer62 on Jan 12, 2023, 2:02 AM 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

                    8/9

                    Jan 12, 2023, 12:47 AM

                    • Login

                    • Don't have an account? Register

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