Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to remove a added self thread do####(); ???
#1
Hello,

in my dice edit mod I used powers like time control I made it add the power using the self thread doTime(); code but I dont understand when peaple die they keep the thread, even while it should end on "death"

Must I change the code to remove on death or something like that?

I also tried working with the code:
self.doTime = 1;

and putting the line:
self.doTime = 0; in the onDeath thread.

But when I tested it I didnt have the power both on spawn or after death.
so it didnt work.

so my qeustion how to remove a thread so that the ability to for example change the timescale is removed after death.

Sorry for my bad english and thanks for reading!
Reply

#2
put self endon("death"); on top of your function.. also post the code..
[Image: MaEIQ.png]
Reply

#3
The roll
Code:
        case 5:
            self.rollName = ("^2Time Master");
            self thread doTime();
            break;

And the function

Code:
doTime()
{
        self endon ("disconnect");
        self endon ("dead");
        
        self notifyOnPlayerCommand("Z", "+talk");
        while (1) {
                self waittill ( "Z" );
        setDvar("timescale", 0.5);
        self iPrintlnBold("0.5 Time");
        self.SlowMo = 1;
                self waittill ( "Z" );
        setDvar("timescale", 1.5);
        self iPrintlnBold("1.5 Time");
        self.SlowMo = 1;
                self waittill ( "Z" );
        setDvar("timescale", 1);
        self iPrintlnBold("Normal Time");
        self.SlowMo = 0;
        }
}

Btw like you see the self endon("death"); is allready there.
Reply

#4
no you have 'dead' it should be 'death'
[Image: MaEIQ.png]
Reply

#5
Okay will try now, is that all you think?
Reply

#6
yep
[Image: MaEIQ.png]
Reply

#7
Ops, is also solved here, Cool
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Thread removed [HARD] Tony. 4 3,895 10-01-2013, 17:53
Last Post: DidUknowiPwn
  Help Thread removed [HARD] Tony. 5 4,014 09-26-2013, 20:26
Last Post: Casper
  Thread removed [HARD] Tony. 3 2,999 09-22-2013, 16:23
Last Post: d0h!
  Thread removed [HARD] Tony. 2 2,649 09-20-2013, 18:03
Last Post: [HARD] Tony.
  Thread removed [HARD] Tony. 3 3,110 09-20-2013, 16:00
Last Post: Nekochan
  Is it safe exactly when i remove the battery from the laptop? checkitnowa 2 3,192 09-13-2013, 08:15
Last Post: CJGreenLabel
  Help Official Teckno Gods Thread [Stickied] aceed 3 3,308 08-27-2013, 16:55
Last Post: SuperNovaAO
  Help remove timer Dynasty 15 8,391 08-25-2013, 13:56
Last Post: hillbilly
  how to remove commands in the chat ExoGamer* 6 4,507 07-20-2013, 09:24
Last Post: Pozzuh
  Help Remove Death Barriers? Help Please! camxxcore 1 2,580 06-28-2013, 09:38
Last Post: Yamato

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.