01-05-2011, 11:48 PM
Hi,
My method is quite crude, but it works and saves loads of time otherwise wasted on debugging scrupts instead of creating something useful. The supposedly more elegant scripted methods I tried out all failed on either JIP, respawn or unit switch or were only working in MP.
One needs several files in the mission folder:
- Briefing.html: nowadays only contains the debriefing texts
- init.sqf: only executed once, therefore actually not suitable to call the briefing.sqf in this in case of JIP, respawn or unit switch
- initjipcompatible.sqf: this file calls the briefing.sqf
- briefing.sqf: this contains the code to generate objectives and briefing notes
Not that I create tasks and briefing notes for each playable unit rather than for a generic player to make the briefings JIP, unit switch and respawn proof. This saves a lot of scripting and debugging of scripts. Now I can make the lot even simpler by using a string table, but I have not yet bothered so far as a couple of CTRL + C and CTRL + V commands work faster for me.
It is important that all playable units are actually named in the editor. Generally I use the convention of the call sign and the number, but that is just personal preference. As the objectives in the task list are generated for individual units, they need to be updated for each unit.
For some arcane reason the briefings show up in the editor only after I synchronise the medical modules with the playable units, before I do that there is nothing visible. As these are a standard item in all my missions, I never looked into the underlying cause.
A more detailed explanation will follow later.
Regards,
Sander
My method is quite crude, but it works and saves loads of time otherwise wasted on debugging scrupts instead of creating something useful. The supposedly more elegant scripted methods I tried out all failed on either JIP, respawn or unit switch or were only working in MP.
One needs several files in the mission folder:
- Briefing.html: nowadays only contains the debriefing texts
- init.sqf: only executed once, therefore actually not suitable to call the briefing.sqf in this in case of JIP, respawn or unit switch
- initjipcompatible.sqf: this file calls the briefing.sqf
- briefing.sqf: this contains the code to generate objectives and briefing notes
Not that I create tasks and briefing notes for each playable unit rather than for a generic player to make the briefings JIP, unit switch and respawn proof. This saves a lot of scripting and debugging of scripts. Now I can make the lot even simpler by using a string table, but I have not yet bothered so far as a couple of CTRL + C and CTRL + V commands work faster for me.
It is important that all playable units are actually named in the editor. Generally I use the convention of the call sign and the number, but that is just personal preference. As the objectives in the task list are generated for individual units, they need to be updated for each unit.
For some arcane reason the briefings show up in the editor only after I synchronise the medical modules with the playable units, before I do that there is nothing visible. As these are a standard item in all my missions, I never looked into the underlying cause.
A more detailed explanation will follow later.
Regards,
Sander