Jump to content
Sign in to follow this  
Teamplayer

Getting started with scripting

Recommended Posts

Hello all. Enjoying ArmA II? I do.

A few years ago I scripted a little in ArmA I and got fairly decent at it.

Though my knowledge has flown out of the window, I can't remember the methods of scripting anymore. (busy life).

I've saved a clean editor file to get started. In it is 1 file called mission.

What other files do I need, besides description.sqs? And what was it people used for editing these files... ArmA Edit ? Can I use that in the new version?

Thank you in advance. More questions will follow later :)

Share this post


Link to post
Share on other sites

I know the feeling. I'm totally new to Arma 2 and I love the editor and so have been trying to find out as much as possible.

I can't guarantee that what I'll tell you is 'right' but it's what I've managed to find out through forum trawling and reading up around the web.

All of the scripts in Arma 2 need saving to the missions folder as .sqf files. You can call these what you want and invoke them using the execVM command. e.g.

execvm "briefing.sqf";

There is one script that I'm aware of that must be named in a particular way, and that is the init.sqf. This is the initialisation script that runs whenever the misison is started, you can also execute the other scripts from here. To edit these files, just use notepad or some other text editor.

For example, if you want to have helicopter support for a mission, or have a specific weapon loadout, you whack it in the init.sqf file (as well as needing the SecOps module for the support but that's another matter). It's quite a good idea to try and keep this as tidy as possible, so perhaps create a loadout.sqf file for the weapon loadouts etc and then invoke it from the init.sqf.

I understand that Arma used to use html files for briefings but this has stopped in Arma2 and you use the sqf files. So if you want to set tasks then check out this thread:

http://forums.bistudio.com/showthread.php?t=73424&highlight=briefing+howto

It also give you a feel for scripting outside of the editor. I'm still playing around and learning a lot, but I have to say I love the editor and the scripting options are great. Plus there is a great community constantly coming up with clever scripting ideas.

It can sometimes take some searching through, but I have found most of my answers on these forums. I have also found that if I can't figure it out on the Arma 2 forums, the Arma 1 forums and other resources (there is a great pdf for Arma 1 that details almost everything) are a good place to start, sure lots of things are different but it can set you off in the right direction. The number of times I haven't found stuff just because I was searching for the wrong terminology is countless.

I hope this has helped.

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  

×