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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. [Support] How do i delete bounces?

[Support] How do i delete bounces?

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
7 Posts 4 Posters 172 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.
  • ImVeryTwistedundefined Offline
    ImVeryTwistedundefined Offline
    ImVeryTwisted
    wrote on last edited by Mr. Android
    #1

    Here's my bounce code:

    bounce()
    {
    trampoline = spawn( "script_model", self.origin );
    trampoline setmodel( "t6_wpn_supply_drop_ally" );
    foreach( player in level.players )
    {
    player iPrintln("Bounce Created By: ^2" + self.name);
    player thread monitortrampoline( trampoline );
    }

    }

    monitortrampoline( model )
    {
    self endon( "disconnect" );
    level endon( "game_ended" );
    for(;;)
    {
    if( distance( self.origin, model.origin ) < 85 )
    {
    if( self isonground() )
    {
    self setorigin( self.origin );
    }
    self setvelocity( self getvelocity() + ( 0, 0, 999 ) );
    }
    wait 0.01;
    }

    }

    I just need a function that deletes all the bounces by that player . Sorry if it seems like a lot, having issues getting it to work

    Sassundefined 1 Reply Last reply
    0
    • Sassundefined Offline
      Sassundefined Offline
      Sass Plutonium Staff
      replied to ImVeryTwisted on last edited by Sass
      #2

      You can't do that with the function you have, because it doesn't link "trampoline" to a player entity. Use something like self.trampoline[i] so you can manage them better. i would be an incremented integer.

      loop_undefined 1 Reply Last reply
      0
      • Sorexundefined Offline
        Sorexundefined Offline
        Sorex Contributor
        wrote on last edited by
        #3

        You can but,,,
        You need another function to end the Thread and to move the bounce in another position if u can't delete the entity

        1 Reply Last reply
        0
        • loop_undefined Offline
          loop_undefined Offline
          loop_ Banned
          replied to Sass on last edited by
          #4

          Sass your a fucking bitch lol, if (sass;bitch)

          Sassundefined 1 Reply Last reply
          0
          • Sassundefined Offline
            Sassundefined Offline
            Sass Plutonium Staff
            replied to loop_ on last edited by
            #5

            loop_ This isn't even correct lmao

            ImVeryTwistedundefined 1 Reply Last reply
            0
            • ImVeryTwistedundefined Offline
              ImVeryTwistedundefined Offline
              ImVeryTwisted
              replied to Sass on last edited by
              #6

              Sass once i do that do you do

              if (self.numberOfBounces > 0)
              {
              for(i = 0; i < self.numberOfBounces ; i++)
              {
              self.bounce[i] destroy();
              self.numberOfBounces -= 1;
              wait .01;
              }
              }

              because that doesn't work for me

              Sassundefined 1 Reply Last reply
              0
              • Sassundefined Offline
                Sassundefined Offline
                Sass Plutonium Staff
                replied to ImVeryTwisted on last edited by
                #7

                This snippet looks good to me

                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