Skip to content
  • 0 Unread 0
  • 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 859 Views 2 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.
  • ImVeryTwisted Offline
    ImVeryTwisted 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

    Sass 1 Reply Last reply
    0
    • ImVeryTwisted ImVeryTwisted

      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

      Sass Offline
      Sass Offline
      Sass
      Plutonium Staff
      wrote 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_ 1 Reply Last reply
      0
      • Sorex Offline
        Sorex 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
        • Sass Sass

          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_ Offline
          loop_ Offline
          loop_
          Banned
          wrote on last edited by
          #4

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

          Sass 1 Reply Last reply
          0
          • loop_ loop_

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

            Sass Offline
            Sass Offline
            Sass
            Plutonium Staff
            wrote on last edited by
            #5

            loop_ This isn't even correct lmao

            ImVeryTwisted 1 Reply Last reply
            0
            • Sass Sass

              loop_ This isn't even correct lmao

              ImVeryTwisted Offline
              ImVeryTwisted Offline
              ImVeryTwisted
              wrote 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

              Sass 1 Reply Last reply
              0
              • ImVeryTwisted ImVeryTwisted

                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

                Sass Offline
                Sass Offline
                Sass
                Plutonium Staff
                wrote on last edited by
                #7

                This snippet looks good to me

                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
                • Tags
                • Popular
                • Users
                • Groups
                • Donate