Suppose you want to create a new mission, but you don't want to get too complicated for your first effort. You could implement a very simple modification of one of our existing missions. For example, suppose you want to modify MISSION_NETWORKBATTLE07. You want the result to be exactly like "Peabody's Mission", but you want to disable airfield repairs so that once an airfield is damaged, it STAYS damaged for as long as participating players remain active or until it is destroyed and the mission ends.
You would begin by replacing the contents of "MissionNetworkBattle07.cpp" with the contents of "MissionNetworkBattle06.cpp" (Peabody's Mission), adjusting the mission name and menu description text as appropriate to your mission design ideas.
All airfield repairs are handled within a single function, named "RepairDamagedAirfields", within "mission.cpp". You could insert new code like THIS near the top of that function:
if(CurrentMissionNumber==MISSION_NETWORKBATTLE07){//GethereonlywhenflyingMISSION_NETWORKBATTLE07return; // No airfield repairs in this mission.}
With that change, damaged airfields would never get repaired when flying in "MISSION_NETWORKBATTLE07".
Once you have your new version of MISSION_NETWORKBATTLE07 working to your satisfaction, you'll need to email your changed source code to webmaster@AskMisterWizard.com for review and possible inclusion in a future version of LAC.
Last edit: bbosen 2022-12-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Suppose you want to create a new mission, but you don't want to get too complicated for your first effort. You could implement a very simple modification of one of our existing missions. For example, suppose you want to modify MISSION_NETWORKBATTLE07. You want the result to be exactly like "Peabody's Mission", but you want to disable airfield repairs so that once an airfield is damaged, it STAYS damaged for as long as participating players remain active or until it is destroyed and the mission ends.
You would begin by replacing the contents of "MissionNetworkBattle07.cpp" with the contents of "MissionNetworkBattle06.cpp" (Peabody's Mission), adjusting the mission name and menu description text as appropriate to your mission design ideas.
All airfield repairs are handled within a single function, named "RepairDamagedAirfields", within "mission.cpp". You could insert new code like THIS near the top of that function:
With that change, damaged airfields would never get repaired when flying in "MISSION_NETWORKBATTLE07".
Once you have your new version of MISSION_NETWORKBATTLE07 working to your satisfaction, you'll need to email your changed source code to webmaster@AskMisterWizard.com for review and possible inclusion in a future version of LAC.
Last edit: bbosen 2022-12-21