I’m working on a new map and was wondering if it would be possible to randomly choose the attacking/defending team when the game starts.
First of all you would need double entities for both axis /allies objectives/ multiple TOI’s…With scripting you could disable (setstate command) entities, so that would not cause any problems…
One problem would be: how would the OBJDATA-file look like? My guess is both teams have the same objdata, for example take the objdata-file from the stock map “Radar”
// Axis Objective Descriptions
wm_objective_axis_desc 1 "Primary Objective:**Defend the Radar Installation's Main and Side Doors."
// Allied Objective Descriptions
wm_objective_allied_desc 1 "Primary Objective:**Dynamite the Radar Installation Doors."
It would look something similar to this, because you never know if axis or allies will be the attacking/defending team:
// Axis Objective Descriptions
wm_objective_axis_desc 1 "Primary Objective:**The attacking team must destroy the Main doors, Defending team must avoid this."
// Allied Objective Descriptions
wm_objective_allied_desc 1 "Primary Objective:**The attacking team must destroy the Main doors, Defending team must avoid this."
Doesn`t this also means that the camera´s at the limbo/menu must be pointed at the same Objective regardless if it´s a axis-allies obj?
The biggest problem would be the scripting, particular this part:
// Stopwatch mode defending team (0=Axis, 1=Allies)
wm_set_defending_team 0
// Winner on expiration of round timer (0=Axis, 1=Allies)
wm_setwinner 0
This event is within the game_manager part of the script, I really, really can´t see a way to change the attacking-defending team through scripting, or am I missing something…