Jump to content
Sign in to follow this  
pebcak

Calling a script from init.sqs

Recommended Posts

I have a short intro script that I would like all clients to run on joining. How do I call this script, called titles.sqs, from within the init.sqs file? As the intro takes about 30 seconds to complete, is there a way for this script to be called by init.sqs without the processing of the rest of the init.sqs script pausing until the titles.sqs script is complete? Does this make any sense..?

wink_o.gif

Share this post


Link to post
Share on other sites

Yeah, I read that. The query I have is if I put that call into the init.sqs file will the remainder of that init.sqs file only run after that call has completed?

Share this post


Link to post
Share on other sites

If I got u right,you want to put your titles.sqs into init.sqs.Why not? It's auto script,it appears when just the mission begins.

So the first line in init.sqs must write [] exec "titles.sqs".And then another comands

Share this post


Link to post
Share on other sites

in init.sqs:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

mycutscenefinished = false

[]exec"yourcutscene.sqs"

@mycutscenefinished

....

Rest of init.sqs code

....

At the end of yourcutscene.sqs put mycutscenefinished = true

If you convert titles.sqs into titles.sqf, then you may use a different way:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_script=[]execVM"yourcutscene.sqf"

@scriptDone _script

....

Rest of init.sqs code

....

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  

×