The function I have written is called ShowBriefing, as the name suggest, it shows the briefing of the map but with some checks related to the interface, text to show and music in the briefing.
The function requires 5 arguments:
- The title of the briefing. A single string that is show at the top of the screen.
- The objectives of the map. A list of strings that will show the objectives that the players has to complete. Be aware that this doesn't set the objectives of the map, since those are set through triggers.
- The interface, or simply the background image. This is a single string that has the path to an image to use as a background.
- The text to show during the briefing. This one is also a string that contains a path to a file, generally a .txt file, where it contains the text to appear on the screen.
- The music to play in background. This argument can be a single string or a list of strings, each one containing a path to the music to play in background.
-- function declaration
the_title = "TITLE"
the_objectives = {"- Build a barracks", "- Build 4 farms."}
the_interface = "background.png"
the_text = "mission.txt"
the_music = {"Human Music.ogg"}
ShowBriefing(the_title, the_objectives, the_interface, the_text, the_music)