Jump to content

Recommended Posts

Is there any way that one script can be told to exit/stop running, etc by another script.

Im not after setting a variable to false. ie

Script A) Thatscript=true

Script B) ? Thatscript : exit

Ive got a kind of jukebox thing going that cycles through tracks unfortunalty if one were to turn it off. Then turn it on again, at the moment you would get two incarnations of the same script running and interrupting each others tracks.

Any ideas?

Thx.

Share this post


Link to post
Share on other sites

Did a search but theres not much on the subject.

Does the terminate command only work for the .sqf files? Ive tried it numerous ways with my sqs and cant for the life of me get it to work.

The wiki example/suggested usage doesn't actually terminate the script, it just ends up executing it again for me. Ive tried various things but im not getting the result i want.

ie

Quote[/b] ]_Script=[] exec "musicplayer.sqs";

Terminate _Script;

Share this post


Link to post
Share on other sites
Quote[/b] ]Does the terminate command only work for the .sqf files?

Terminate only works with scripts launched using execVM or spawn.

For scripts launched with exec you should be able to use the exit command.

Share this post


Link to post
Share on other sites

Right so basically i cant terminate an sqs remotely then?

Or will this

Quote[/b] ]

_Script=[] exec "musicplayer.sqs";

Exit _Script;

do the job then?

Love the wiki its got a misleading sqs hint at the bottom that suggests theres more going on, it isn't clear at all.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×