Jump to content
Sign in to follow this  

how to make a script

Recommended Posts

Hey Wero,

Lets start with a tool you will need first:



Install it, and then when you run it, there are various types of scripts depending on what you want to do in the game.

you have

-SQF and SQL scripts that have various functions, those I really can go into, theres members that would know more then I.

-Briefing scripts for briefings

-Descriptio.ext scripts for mp

-Init scripts and I could go on.


Mission Editing and Scripting Information


Scripting Commands by Functionality


This may help you:

Basic Scripting Tutorial




Examples of scripts you can try out, and make yourself:

Script Examples


I would have to say in my opinion that understanding the editor and knowing how to create a basic mission properly,

and implement codes, and then be able to apply scripts, is to learn how to use the editor, this would help you get a clearer picture of how the scripts work ingame.

Mission Editor


Mission editing Newbie FAQ


Armed Assault Editing Guide - Deluxe Edition - English version


Theres alot of members here that can really help you in various directions that know how to create scripts and such,

but as i said really all depends on what you are looking to do.

hope that helps.

Share this post

Link to post
Share on other sites

ok thank u

---------- Post added at 23:23 ---------- Previous post was at 23:21 ----------

would it let me make rpg type scripts?

Share this post

Link to post
Share on other sites

You can make any type of script you want, provided you have an idea, or know how.

I would hope that some of the scripting masters around here would see the thread here and

further help you as my knowledge is limited in script building especially from scratch.

A good way to learn as been said by numerous scripters, and reg people alike on the forums here, is to find a script, or something that does what

you want and then open it up and see how its done, learn by example.

Share this post

Link to post
Share on other sites

OK, let's say you have an enemy vehicle placed on the editor. That vehicle is a Shilka. Let's say you also want it to respawn at the same place it was before, and you only want it to respawn 5 times and 5 minutes after it has been destroyed.

So place your shilka in the editor and in the init line write the following:

nul = [this, 5, 300] execVM "spawnshilka.sqf";

You'll understand what is written inside the brackets (array) later so i recommend you to download Notepad ++ from the web first.

As soon as you've installed notepad ++ create a new file. Now next you need to pass the arguments of what you written inside the brackets of the init line of the shilka to the script. So you need to use the select command. It allows you to select arguments from the array that is calling the script:

_veh = _this select 0;
_lives = _this select 1;
_delay = _this select 2;
_type = (typeOf _veh);
_dir = (getdir _veh);
_position = (getpos _veh);

So now you've selected arguments from the calling array and got extra assigned variables to be able to use BIS_fnc_SpawnVehicle. It will spawn a crewed vehicle. See here:


Let's keep going with our script:

private ["_veh","_lives","_delay","_type","_dir","_position"];

_veh = _this select 0;
_lives = _this select 1;
_delay = _this select 2;
_type = (typeOf _veh);
_dir = (getdir _veh);
_position = (getpos _veh);

_loop = true;
while {_loop} do {
 if (!alive _veh) then {
   if (_lives == 0) then {
     _loop = false;
   } else {
     _lives = _lives - 1;
     sleep _delay;
     deletevehicle _veh;
     _veh = [_position, _dir, _type, EAST] call BIS_fnc_spawnVehicle; 
 sleep 1;

Ok if you want to learn, take a look at the script, and take a look here :


Browse through the commands i'm using in the script i wrote, and try to understand what is going on. Feel free to post your doubts and questions.

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