You can easily make a campaign file using the OFP
CampEdit, it's a very simple and intuitive little application. You can also use it for ArmA campaigns with some slight editing of the files (just look at the description.ext of a working ArmA campaign for reference).
The key thing for making a branching campaign is simply to match up the different "ends" with the appropriate triggers. Example:
class Part1
{
name = "Start";
cutscene = ;
firstMission = StartingMission;
lost = ;
end1 = ;
end2 = ;
end3 = ;
end4 = ;
end5 = ;
end6 = ;
class Mission1: MissionDefault
{
end1 = Mission2;
end2 = Mission3;
end3 = Mission4;
end4 = Mission5;
end5 = Mission6;
end6 = Mission7;
lost = Mission1;
template = Mission1.Intro;
};
In Mission1 (which follows directly on StartMission), the different ends (1-6) correspond to the End # 1 - # 6 triggers found in the editor. E.g., if obj1 && obj2 then --> End #1, if !obj1 && obj2 --> End #2 etc. etc.
You can make endless possibilities beyond 1-6 by creating interval missions (e.g., end 1-5 go to their respective endings, end 6 goes to a new mission which again has end 1-5 alternatives etc etc.).
However, even easier is to simply use saveVar. saveVar saves a variable between missions (forever), so you can for instance at the end of mission 1 saveVar a variable:
saveVar "obj1"
And then in the next mission (there's no loadVar - they're loaded automagically) you can simply have a trigger such as:
Cond: obj1
On Activation: {deletevehicle _x} foreach units enemy_reinforcements
And if obj1 is true, the enemy reinforcements will be deleted in the next mission. You can have quite a lot of variation between missions using this simple method.
Campaign scripting is a little bit on the advanced side, and it's hard to test except by actually creating and playing the campaign. That's of course why using the multiple ending way is easier, since then each mission can be created without relying on previously saved variables.
Oh, if you want to save e.g. your group (wounded, killed etc.) between missions you can always try
RUG Campaign Good luck!
Wolfrug out.