SkyDice 10 Posted May 3, 2011 (edited) Hey guys, it's been ages since I last coded briefings (made several missions for Op Arrow), but I'm having a little trouble coding for vanilla Arma2. I've got my briefing set up, my init.sqf is there with execVM "briefing.sqf"; in it (I just copied an init.sqf from one of my older missions for OA, which works fine). When I load my Arma2 mission with all the above set up correctly, the task and diary texts appear as normal on the map screen etc - but the actual briefing itself doesn't run at startup, it just loads straight to the game engine. I'm sure I'm missing something really obvious, and I have googled/searched for a good half hour with no success. Anyone care to tell me what I'm doing wrong? :) EDIT: here's the briefing.sqf: waitUntil { !isNil {player} }; waitUntil { player == player }; player createDiaryRecord ["Diary", ["Info", "Created by SkyDice<br/>http://www.theclawproject.net"]]; player createDiaryRecord ["Diary", ["Scenario", "US forces are undertaking a covert insertion to locate and disable an enemy Early Warning Radar system and accompanying AA batteries."]]; tskobj_1 = player createSimpleTask["Disable AA Site"]; tskobj_1 setSimpleTaskDescription ["Locate and destroy enemy Radar installation and AA batteries", "Destroy AA/Radar Installation", "AA/Radar Installation"]; tskobj_1 setSimpleTaskDestination (getMarkerPos "obj_marker1"); player setCurrentTask tskobj_1; // run this file again when respawning (only setup the killed EH once though) if ( isNil{player getVariable "mk_killedEHadded"} ) then { player addEventHandler ["killed", { [] spawn { waitUntil { alive player }; // waitUntil player has respawned execVM "briefing.sqf"; }; }]; player setVariable ["mk_killedEHadded", true]; }; EDIT2: More confused now. The briefing loads properly when run as a multiplayer game, but not as a single player. Guessing this is something to do with the scripting in the briefing.sqf... ah well as long as it works, though if anyone knows why do let me know! Edited May 3, 2011 by SkyDice Share this post Link to post Share on other sites
celery 8 Posted May 3, 2011 Did you remember to include briefing.html in the mission folder? Share this post Link to post Share on other sites
SkyDice 10 Posted May 3, 2011 (edited) Celery - briefing.html? I have briefing.sqf in there, does it need to be .html in Arma2? I used to make missions for Op Arrow, but this is my first go at making one for Arma2. I assumed they were the same though for the most part, I knew OA had some minor differences in the way the editor/scripting is used? Like I say the briefing screen shows up fine when played as an MP mission, just not if played as an SP mission. In both modes the task/diary entries show up fine once you're in the game and playing, but odd that it doesn't show the briefing in a single player start. :) Edited May 3, 2011 by SkyDice Share this post Link to post Share on other sites
celery 8 Posted May 3, 2011 Create briefing.html in the folder. Share this post Link to post Share on other sites
SkyDice 10 Posted May 3, 2011 (edited) Create briefing.html in the folder. Ok, will do. I was under the impression that briefing.html was only used for debriefing text (which I wasn't going to use). Is it the case then that this file is still required, even if it's not going to be used? It's not called anywhere in the init.sqf? Appreciate the help mate, seem to remember you helping me once or twice before in fact - so thanks! :) Edit: tried it, no success. :( Edited May 3, 2011 by SkyDice Share this post Link to post Share on other sites
celery 8 Posted May 3, 2011 Are you trying it in the editor? With shift+preview? Remember to save the mission after having added the html. Share this post Link to post Share on other sites
SkyDice 10 Posted May 3, 2011 (edited) Are you trying it in the editor? With shift+preview? Remember to save the mission after having added the html. (lots of swearing later..:) ) Yup, you're quite right - forgot to resave the mission with the .html file present! What a plonker I am! Thanks for pointing me in the right direction. So, just to clarify then - in Arma2 that briefing.html needs to be present (even if empty) as well as the briefing.sqf, but in Op Arrow, briefings work fine with just the .sqf? Edited May 3, 2011 by SkyDice Share this post Link to post Share on other sites
neokika 62 Posted May 3, 2011 Hi, Change this waitUntil { !isNil {player} }; to this waitUntil { !isNull player }; _neo_ Share this post Link to post Share on other sites
SkyDice 10 Posted May 3, 2011 (edited) Are you trying it in the editor? With shift+preview? Remember to save the mission after having added the html. (lots of swearing later..:) )Yup, you're quite right - forgot to resave the mission with the .html file present! What a plonker I am! Thanks for pointing me in the right direction. So, just to clarify then - in Arma2 that briefing.html needs to be present (even if empty) as well as the briefing.sqf, but in Op Arrow, briefings work fine with just the .sqf? Ok, on further checking - with the saved briefing.html, the briefing appears in SP mode (yay). The actual tasks etc are gone though - presumably because the briefing.html I used was blank. I'll check in a second and transfer the code from my .sqf to the .html, which I assume will sort it out. However - the Biki says that in Arma2, briefing.html is only used to hold the debriefing information, which as I said, I'm not using. So is the Biki just plain wrong, and Arma2 needs .html, not .sqf? EDIT: Yup, transferring the code to the .html and changing the init.sqf to call the .html instead of the .sqf makes it all work perfectly. Guess the documentation's wrong after all! Edited May 3, 2011 by SkyDice Share this post Link to post Share on other sites