Thread calling
Moderator: Moderators
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Thread calling
H! TH3R3,
Just wanted to ask: what's the difference between exec, thread and waitthread? I suppose that thread executes the thread in the same time, without stopping the script/object that calls that thread, and waitthread executes that thread, but stops the calling script until the thread has finished, is that right? Correct me if I'm wrong.
Rookie One
Just wanted to ask: what's the difference between exec, thread and waitthread? I suppose that thread executes the thread in the same time, without stopping the script/object that calls that thread, and waitthread executes that thread, but stops the calling script until the thread has finished, is that right? Correct me if I'm wrong.
Rookie One
I think exec is to execute some .scr, like missioncomplete, ai, weather, friendly etc.
Thread is used in scripts for like to store info seperately, for example, thread objectives, thread levelend etc.
Waitthread is used to add info, how do I say this, e.g, waitthread global/objectives.scr::add_objectives, waitthread global/items.scr::add_item.
Thread is used in scripts for like to store info seperately, for example, thread objectives, thread levelend etc.
Waitthread is used to add info, how do I say this, e.g, waitthread global/objectives.scr::add_objectives, waitthread global/items.scr::add_item.
Live to map, not map to live.
-mohaa_rox, .map
moderator
-mohaa_rox, .map
moderator
Rookie one was right, you're certainly wrong rox.
You can call threads by using 'thread', which will be started as a seperate script process. 'Waitthread' runs the thread in the same process. Therefore, waitthread is better for performance and should be used whenever possible.
'exec' can only be used to execute other script files. 'waitexec' is the same as exec but waits till all threads in the executed script file have finished.
You can call threads by using 'thread', which will be started as a seperate script process. 'Waitthread' runs the thread in the same process. Therefore, waitthread is better for performance and should be used whenever possible.
'exec' can only be used to execute other script files. 'waitexec' is the same as exec but waits till all threads in the executed script file have finished.
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Yay!
Yay! I was right
What a surprise
I want to ask one more question. Can I execute a thread from another script file by thread command? Oh, I forgot - exec command executes main thread, is that right?
Rookie One
Rookie One
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
?
But is it right (in map script):
thread global/hostage.scr::follow_disable

thread global/hostage.scr::follow_disable
Re: ?
Yup 8)Rookie One wrote:But is it right (in map script):
thread global/hostage.scr::follow_disable
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
:)
Thanks 8)
- small_sumo
- Lieutenant General
- Posts: 953
- Joined: Mon Jul 01, 2002 4:17 pm
- Contact:


