Jump to content
Sign in to follow this  
Rommel

init.sqs

Recommended Posts

Unless anyone else hasnt noticed, like myself tounge_o.gif , that if you have a file called init.sqs in a mission you dont have to execute it. It does it automatically. I learn something everyday..... wink_o.gifwow_o.gif

Share this post


Link to post
Share on other sites

init.sqs is automatically executed at the start of your mission.

Share this post


Link to post
Share on other sites
init.sqs is automatically executed at the start of your mission.

Yes and it's actually executed even before the briefings.

Share this post


Link to post
Share on other sites

There is also what you might call an "equal but opposite" script which is executed at the end of the mission. It is called exit.sqs.

For details of these and other automatically-called event based scripts look here.

Share this post


Link to post
Share on other sites

Some bits of useful information about init.sqs that I have experienced....

init.sqs executes before briefing but, the time delays will cause the script to halt until after briefing:(such as "~0.1")

also functions within the init.sqs are executed at any time, but any called scripts (such as: [player] exec "MyScript.sqs") will not necessarily *always* execute before the briefing screen - so scripts that move markers, perform setpos'ing, change player weapons, etc... should be handled with either functions or within the init.sqs itself if you have trouble getting things to appear before the briefing screen.

I've had some trouble with calling scripts via the init lines of editor placed playable units also.

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  

×