Page 1 of 1

About thread's

Posted: Thu Mar 04, 2004 9:25 pm
by Klaus
Hi All :P

I am looking for any example using thread's , using on info_player allied or axis , on entity description on radiant (N) I see :

--------------------------------------------------------------------------------

Values:

=======

"angle" - the direction the player should face

"thread" - the thread that should be called when spawned at this position

"arena" - the arena that this start point is located in

--------------------------------------------------------------------------------

The description in red mark is my doubth , I need any example for make this type thread works .

Trigger teleport

In this trigger has the same thread option called teleportthread .

--------------------------------------------------------------------------------

Values:

=======

"key" The item needed to activate this. (default nothing)

"teleportthread" The thread that is run when the player is teleported

--------------------------------------------------------------------------------

Somebody have an idea to make both that threads work or example ???

Any Help is Welcome :wink:

Thanks

Klaus

Re: About thread's

Posted: Fri Mar 05, 2004 12:08 am
by Bjarne BZR
Klaus wrote:"thread" - the thread that should be called when spawned at this position
If you set thread / look_a_spawning on the start entity:

Then the method with the label look_a_spawning will be called in a thread. This just means that the code of that method will be executed.

Such a method would look something like this:

Code: Select all

look_a_spawning:
    // Some cool code here
end
... and appear somewherre after the end of the main: method.
Klaus wrote:"teleportthread" The thread that is run when the player is teleported
If you set teleportthread / look_a_teleport on the trigger entity:

Then the method with the label look_a_teleport will be called in a thread.

Such a method would look something like this:

Code: Select all

look_a_teleport:
    // Some cool code here
end
... and appear somewherre after the end of the main: method.

Posted: Fri Mar 05, 2004 3:24 am
by Klaus
Hi Bjarne BZR

I tryed this method , but not work at his moment . :(
Please check my scripts :oops:

My info player entity on map :

Code: Select all

angle/90
classname/info_player_allied
origin/1242 35 97
thread/look_a_spawning
My thread on script :

Code: Select all

level waittill roundstart

end

look_a_spawning:

local.player=parm.other
if (local.player.dmteam == "allies")
{
local.player.model = models/player/allied_pilot.tik
}
thread look_a_spawning
end
This script worked when I used a trigger :D , but not yet on spawn :cry:

Thanks for Help

Klaus

Posted: Fri Mar 05, 2004 6:48 am
by jv_map
In my experience thread and teleportthread don't work :(

Posted: Fri Mar 05, 2004 10:00 am
by Bjarne BZR
Well, he is saying the spawn threading dosent work jv... but I seem to remember you telling me that it does not work either when I was experimenting with the Liberation game mode...

Posted: Sat Mar 06, 2004 12:18 am
by Klaus
Hi :P

Thanks guys for help me :wink: , well the only way is to use trigger multiple thread but this is reliable to use it on a server with 16 players per side ??? :roll:

Byes

Klaus

Posted: Sat Mar 06, 2004 12:29 am
by Bjarne BZR
Well, depends on how you use it... if it is all over the map and calls a thread that does a lot of computation, it may be a problem.

Posted: Sat Mar 06, 2004 2:03 am
by nuggets
put a trigger multiple at each spawn point

and have

spawned:
if ((parm.other.dmteam == "allies") && !(parm.other.triggered == 1))
parm.other model models/player/allied_pilot.tik
parm.other.triggered = 1

while (isAlive parm.other)
waitframe

parm.other.triggered = 0

Posted: Sat Mar 06, 2004 10:23 am
by Bjarne BZR
Maby put a delay / 1 on the triggers to avoid a few unnessesary triggerings... but else I think there will be no probs.

Posted: Sun Mar 07, 2004 12:09 am
by Klaus
WoW thanks nuggets , I try using this script and work very well , and is more simple that mine , and I will try putting delay / 1 on trigger like info from Bjarne BZR 8-) .
Really thanks guys for support :P

Byes

Klaus