FAQ: Mission Editing – Operation Flashpoint
I want to be a mission maker! Where do I begin?
A reasonable place to start is the articles available on this wiki (add link here)! Another excellent resource is the forums. Almost all of them have separate discussion boardss for mission editing. Remember to search for what you're looking for before asking!
Next, there are still many sites covering OFP mission editing. Among them are:
How do I add weapons and ammunition to ammo crates, trucks and other objects?
In the "init" section of the object, you can add weapons to the object by inserting the following statement:
<name> AddWeaponCargo ["weapon",number]
Where <name> is the name of the object the weapons will be added to, "weapon" is the reserved name of the weapon you want added and number is the quantity of that weapon to be made available in the object.
For example, if you want to add 15 Mortars to a truck you named "convoy5", you would insert the following statement:
convoy5 AddWeaponCargo ["Mortar",15]
To add ammunition magazines to the object, instead of weapons, just replace the command "AddWeaponCargo" with "AddMagazineCargo".
To remove weapons and magazine previously added to an object, use the following commands:
ClearWeaponCargo <name>
ClearMagazineCargo <name>
Where <name> is the name of the object from which weapons or magazines are to be removed.
What is and how do I define "user defined actions", made available in OFP V1.10?
You can define your own actions in a player's Action menu. The format of the function is:
player addAction ["name","script.sqs"]
This will add a new item to the player's Action menu. "name" is the menu line text to be displayed for the action. When the action is selected from the menu, the script named "script.sqs" will start.
You can add these actions only to a player's unit, not to AI units. This is further improved in OFP's US release and in the OFP Ultimate Upgrade 2 patch. When you use this for multiplayer missions, use the name of the unit instead of the word "player" in the previous example. You can also remove these actions. You need to set an "ID" for the "addAction" function, as in the following example:
id = player addAction ["name","script.sqs"]
"id" is a variable, where the ID of this particular action is stored. Use the following function to remove an added action from the action menu:
player removeAction id
Unfortunately, there is a bug that limits you to removing only the first added action. This has been corrected in the US version and in the OFP Ultimate Upgrade 2 patch.
(Source: Viktor Bocan, BIS Lead Mission Designer).
How can I place customized flags on flagpoles in my missions?
As of OFP version 1.30, the previously available official Flag Pack is now contained in file FLAGS.PBO in OFP's ADDONS subdirectory.
So whether you want to use one of the country flag JPG files packed into the FLAGS.PBO file or whether you've got a customized version of the Jolly Roger you want to hoist (actually, there's one included in the FLAGS.PBO file, named PIRATES.JPG), here are the step-by-step instructions to implement displaying flags in your missions:
1. Flags must be non-progressive (zero progressive passes) 24-bit color 128x256 pixel flag JPG images, like this NATO flag, for example:
Courtesy of Codemasters
2. Customized flag's JPG files must be placed into the directory where your other mission files are located. If you're using a country flag from OFP's FLAGS.PBO file, OFP will automatically locate it in OFP's ADDONS directory.
3. In the mission, define the flag for a given flagpole with one of the following statement:
- For flags from the FLAGS.PBO file, specify:
<unit_name> SetFlagTexture "\Flags\<flag_name.jpg>"
- For flags from a customized flag image file, specify:
<unit_name> SetFlagTexture "\<flag_name.jpg>"
(NOTES: Change <unit_name> in the above examples to the name of the flag bearing object to be modified. Change <flag_name.jpg> in the above examples to the actual country or customized flag JPG image file name you want used for this flagpole).
How do I delete objects I placed on a map in OFP's Mission Editor?
To delete a single object, place the mouse cursor over it and hit you keyboard's DELETE key. To delete several objects at once, hold down the left mouse button and drag a selection box around the objects to be removed and then press the DELETE key.
After you do that, I suggest reading this FAQ item as well.