Here’s the basic script I use for returnable objectives:
//Gold allied_gold
{
spawn
{
wait 200
setstate allied_gold_captured invisible
}
trigger stolen
{
wm_announce 0 "Return the Allied gold to the getaway truck"
wm_announce 1 "The Axis have stolen the Allied gold"
setstate allied_gold_cm_marker invisible
}
trigger returned
{
wm_announce 0 "The Allies have retrieved the gold"
wm_announce 1 "Gold returned! Protect the gold"
setstate allied_gold_cm_marker default
}
trigger captured
{
wm_announce "The Axis have secured the Allied gold"
setstate allied_gold_red invisible
setstate allied_gold_captured default
}
}
allied_objectives //enter this as the scriptname value for the single trigger_flagonly_multiples entity
{
death
{
trigger game_manager obj1
}
}
The death part is what calls the game win script. In my case, it’s just called obj1. In your case, you want to change this to:
trigger game_manager allied_win
Logically, what is happening is that every time a document is returned, it goes to game_manager to check the victory conditions. If the total number of docs returned = 2, the the allies are declared the winner