Page 1 of 1
Disable Thread!
Posted: Sat Mar 20, 2004 2:56 pm
by chrisjbooth2001
Ok ive got a thread, which is turned on at round start..
I need to know is there a command where i can disable a thread, like
(threadname) disablethread?
Posted: Sat Mar 20, 2004 4:34 pm
by fuhrer
why whould you want to create a thread, and then disable it
Posted: Sat Mar 20, 2004 4:48 pm
by Splaetos
what does the thread do?
Can you just let it end when whatever circumstance makes it irrelevant happen?
Or if its called more then once, why not use a if loop to determine whether it should run?
Posted: Sat Mar 20, 2004 8:09 pm
by chrisjbooth2001
Ok im still playing but the box that the script is will make the axis lose all guns and become immune when they touch it.. But i need to use a trigger which will disable it...
This is my script..
//------------------------------------------
axis_end:
//------------------------------------------
while (parm.other.dmteam == "axis" isTouching $axisend)
{
parm.other immune suicide falling explosion explodewall thrownobject grenade rocket impact
parm.other immune bullet fast_bullet vehicle fire flashbang on_fire gib impale bash
parm.other immune shotgun aagun landmine
parm.other takeall
}
end
Where have i gone wrong, and are there any opposite commands i can do?
Opposite meaning, takeall - giveall
immune - unimmune? is it a word? lol
Posted: Sat Mar 20, 2004 8:35 pm
by bdbodger
The way I would do it is this
local.player = parm.other
local.player nodamage
while((local.player.dmteam == "axis")&&(local.player istouching $axisend))
waitframe
local.player takedamage
end
Posted: Sat Mar 20, 2004 8:40 pm
by chrisjbooth2001
And any suggestion for give/take weapons? But I want it so i use the trigger and the area with the box then lets you have weapons.. Ie by disabling the thread..
Posted: Sat Mar 20, 2004 9:04 pm
by Bjarne BZR
Code: Select all
while (parm.other.dmteam == axis && parm.other isTouching $axisend)
{
// Bla bla bla
}
end
Posted: Sat Mar 20, 2004 9:37 pm
by jv_map
I would not use parm.other in while loops

Posted: Sun Mar 21, 2004 9:35 am
by bdbodger
True in that loop if an allies player triggers the trigger the while will no longer be true .
Posted: Mon Mar 22, 2004 4:24 am
by kai0ty
u could just dissable the trigger..........
Posted: Mon Mar 22, 2004 8:18 am
by jv_map
kai0ty wrote:u could just dissable the trigger..........
The triggering of
any trigger in the map would have that same effect

Posted: Tue Mar 23, 2004 3:46 am
by kai0ty
couldnt u just disable the trigger?
Posted: Tue Mar 23, 2004 4:12 am
by dcoshea
chrisjbooth2001 wrote:And any suggestion for give/take weapons?
We already discussed this in your
"Immune" thread.
But I want it so i use the trigger and the area with the box then lets you have weapons.. Ie by disabling the thread..
If a thread does something, you can't just "disable" it and everything the thread does/did gets automatically reversed. You need to reverse all those actions the thread took. In the thread I linked to above there are quite a few suggestions about what to do regarding weapons. The last one is to continually force the player to holster their weapon. Of course, when you stop doing that the player could unholster, so disabling the thread lets them unholster, but it would be best to unholster for them, which you'd have to do yourself - it won't be done for you by "disabling the thread".
Regards,
David