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

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. How do I make it where when people die they dont have 10 seconds after going into flags?

How do I make it where when people die they dont have 10 seconds after going into flags?

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
4 Posts 2 Posters 296 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.
  • Scriptoundefined Offline
    Scriptoundefined Offline
    Scripto
    wrote on last edited by
    #1

    So I have a code where people can go into flags but they have 5-10 seconds before they die, but when they die it still kills them as if the 5-10 seconds wasn't over. and I wanna remove that, like when they die it doesnt kill them it removes the counter. cause every flag they go into it just kills them every time they go into the flag and go for a shot and I really wanna remove that.

    birchyundefined 1 Reply Last reply
    0
    • birchyundefined Offline
      birchyundefined Offline
      birchy
      replied to Scripto on last edited by
      #2

      Scripto Feel free to share a code snippet, though it sounds like you just want to kill the thread responsible (for killing the player after X amount of time) on player death.

      1 Reply Last reply
      0
      • Scriptoundefined Offline
        Scriptoundefined Offline
        Scripto
        wrote on last edited by Scripto
        #3
        self WaitUntilEvent(10, ::IsAliveWrapper, ::SuicideWrapper);
        
        IsAliveWrapper()
        {
            return isAlive(self);
        }
        
        SuicideWrapper()
        {
            self suicide();
        }
        
        WaitUntilEvent(time, function, do)
        {
            self endon("disconnect");
            while(time > 0 || self [[function]]() == false )
            {
                wait 1;
                time--;
            }
            self [[do]]();
        }
        

        here is the code. I'm trying to just make it where when they go through flag and go for a shot before timer is up it get rids of the timer. It does kill them after 5-10 seconds even AFTER they go for a shot.

        1 Reply Last reply
        0
        • Scriptoundefined Offline
          Scriptoundefined Offline
          Scripto
          wrote on last edited by
          #4

          SOLVED!

          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