Page 1 of 1

Killing a Looping Thread

Posted: Sun Dec 19, 2004 8:08 pm
by MPowell1944
Alright. Here is my problem. I have a trigger that makes a player warp his scale via a looping thread. I have another trigger that make the player normal size again, however, the first trigger uses while(isAlive local.player), and because of this, if the player is still alive while hitting the 2nd trigger, it won't stop his scale warping. What I want to do instead is to kill that looping thread when he touches the 2nd trigger so that he becomes a normal size again.

This is a difficult task and have gotten close but still no 100% solution. Anyone know how this could be done?

Posted: Sun Dec 19, 2004 9:16 pm
by Elgan
use maybe

Code: Select all

while(isalive local.player || local.player.becomenormal ==0)
{
//\/\/\/\/\/\/\/
-------------


then in your warp trigger put

Code: Select all

local.player.becomenormal =0
then in the normalise trigger put

Code: Select all

local.player.becomenormal =1

Posted: Sun Dec 19, 2004 10:01 pm
by Green Beret
in the other triggers have a command that turns the scale back to normal,add it to all the triggers.that way itll make them normal size then perform the other triggers command.sound close?

:?

Posted: Sun Dec 19, 2004 11:08 pm
by Elgan
Green Beret wrote:in the other triggers have a command that turns the scale back to normal,add it to all the triggers.that way itll make them normal size then perform the other triggers command.sound close?

:?
but his loop will cancel that command

Posted: Mon Dec 20, 2004 8:06 am
by jv_map
Do as Elgans says... but with && instead of || :wink:

Posted: Mon Dec 20, 2004 3:29 pm
by MPowell1944
Ok I got it to work with what Elgan stated, however, it affected all players, not the local.player. That and it wasn't working as it should. Instead of continuously warping the player, it would start and stop randomly.

Posted: Mon Dec 20, 2004 3:42 pm
by jv_map
Obviously no one will be able to help you if you don't post the code ;)

Posted: Mon Dec 20, 2004 3:48 pm
by MPowell1944
It is ok. I'll retire that idea.