troster 10 Posted December 10, 2013 Hey all, I've made a PvP mission for a few friends and I for a LAN party. BLUFOR needs to extract two hostages (civillians, host1 and host2) back to their base while OPFOR attempts to fight off BLUFOR. If all BLUFOR units die I want OPFOR to get the Mission complete screen and BLUFOR to get the mission failed screen. But if BLUFOR extracts the hostages successfully I want OPFOR to have the Mission Failed screen and BLUFOR to get the mission success screen. Initially, I had a trigger that detected the civilians and once the civilians were detected it would end (The type was End #1) however I figured that this would display mission complete for every unit regardless of what faction they were. I was wondering how to display a mission success and a mission failed for the necessary units. In Arma 2 I remember making what I guess you could call 'properties' for each End type but it's been a long time since I last did that and I cannot remember how to do it at all. Everyone's help is appreciated. Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted December 10, 2013 You can define different endings in the description.ext Create the file in the missionfolder and add something like this: class CfgDebriefing { class End1 { title = "The Hostages got rescued!"; subtitle = ""; description = "The Hostage-takers got annihilated!"; pictureBackground = ""; picture = "b_inf"; pictureColor[] = {0.0,0.3,0.6,1}; }; class End2 { title = "The SWAT Team got wiped out!"; subtitle = ""; description = "No dinner at home tonight for these hostages."; pictureBackground = ""; picture = "b_inf"; pictureColor[] = {0.0,0.3,0.6,1}; }; class End3 { title = "Everyone died!"; subtitle = ""; description = "Suicide statistics going through the roof!"; pictureBackground = ""; picture = "b_inf"; pictureColor[] = {0.0,0.3,0.6,1}; }; }; In the mission you can call each individual ending with this simple line: "end1" call BIS_fnc_endMission; Share this post Link to post Share on other sites
troster 10 Posted December 10, 2013 Thanks, I thought it had something to do with the init.sqf or the description.ext but I couldn't remember what to write. How would I define End 1 as a BLUFOR win and an OPFOR loss so that it will actually say in game that they've won / lost? Or can I not do that? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted December 10, 2013 I don't think this is possible, since you would need to call 2 endings at once. I might be wrong though. Share this post Link to post Share on other sites
bangabob 45 Posted December 10, 2013 "end1" call BIS_fnc_endMission; Ammend this so it calls a different ending depending on your side. if (player ==WEST) then { "end1" call BIS_fnc_endMission;}; if (player ==EAST) then { "end2" call BIS_fnc_endMission;}; Havnt scripted in several months but you get the idea. Share this post Link to post Share on other sites
troster 10 Posted December 10, 2013 Thanks Banga, just curious as to where the script goes? Share this post Link to post Share on other sites
bangabob 45 Posted December 10, 2013 You could make a script called endMission.sqf inside put if (player ==WEST) then { "end1" call BIS_fnc_endMission;}; if (player ==EAST) then { "end2" call BIS_fnc_endMission;}; Inside your trigger that determines the end of the game on ACT have null=[]execVM "endMission.sqf"; Is wont this will work in a dedicated server though. Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted December 10, 2013 Is this possible? That's a nice find, BangaBob, thanks for sharing! Share this post Link to post Share on other sites
troster 10 Posted December 10, 2013 (edited) You could make a script calledendMission.sqf inside put if (player ==WEST) then { "end1" call BIS_fnc_endMission;}; if (player ==EAST) then { "end2" call BIS_fnc_endMission;}; Inside your trigger that determines the end of the game on ACT have null=[]execVM "endMission.sqf"; Is wont this will work in a dedicated server though. Shit, the mission will be hosted on a dedicated server. :( I might just do the different endings Grumpy posted earlier. Otherwise, thanks for the help guys. :) EDIT Would you guys by any chance know the color coding for OPFOR? For BLUFOR it's 0.0, 0.3, 0.6, 1 but I have no idea what it is for OPFOR. Edited December 10, 2013 by ChunkyTomato Share this post Link to post Share on other sites
Larrow 2822 Posted December 10, 2013 Could take care of it all from the server, something like ... _endGameThread = [] spawn { if (isServer) then { while {true} do { _bluUnits = []; { if (isPlayer _x && side _x == west ) then { _bluUnits set [count _bluUnits, _x]; }forEach playableUnits; if ( {alive _x} count _bluUnits == 0 ) exitWith { [ ["DeadLost", false, 2], "BIS_fnc_endMission", west, false] call BIS_fnc_MP; //fade to black [ ["DeadWon", true, true], "BIS_fnc_endMission", east, false] call BIS_fnc_MP; //signature shot }; if ( triggerActivated HostagesEscapedTrigger ) exitWith { [ ["HostageWon", true, true], "BIS_fnc_endMission", west, false] call BIS_fnc_MP; //signature shot [ ["HostageLost", false, 2], "BIS_fnc_endMission", east, false] call BIS_fnc_MP; //fade to black }; }; }; }; Description.ext class CfgDebriefing { class HostageWon { title = "The Hostages got rescued!"; subtitle = ""; description = "The Hostages were successfully resscued!"; }; class HostageLost { title = "The Hostages got rescued!"; subtitle = ""; description = "Time to go AWOL your surely lose you head for this"; }; class DeadLost { title = "Your extraction team got wiped out!"; subtitle = ""; description = "No dinner at home tonight for the hostages."; }; class DeadWon { title = "The extraction team was eliminated"; subtitle = ""; description = "Order more bread and water for the infedel captives"; }; }; 1 Share this post Link to post Share on other sites
troster 10 Posted December 11, 2013 Could take care of it all from the server, something like ... _endGameThread = [] spawn { if (isServer) then { while {true} do { _bluUnits = []; { if (isPlayer _x && side _x == west ) then { _bluUnits set [count _bluUnits, _x]; }forEach playableUnits; if ( {alive _x} count _bluUnits == 0 ) exitWith { [ ["DeadLost", false, 2], "BIS_fnc_endMission", west, false] call BIS_fnc_MP; //fade to black [ ["DeadWon", true, true], "BIS_fnc_endMission", east, false] call BIS_fnc_MP; //signature shot }; if ( triggerActivated HostagesEscapedTrigger ) exitWith { [ ["HostageWon", true, true], "BIS_fnc_endMission", west, false] call BIS_fnc_MP; //signature shot [ ["HostageLost", false, 2], "BIS_fnc_endMission", east, false] call BIS_fnc_MP; //fade to black }; }; }; }; Description.ext class CfgDebriefing { class HostageWon { title = "The Hostages got rescued!"; subtitle = ""; description = "The Hostages were successfully resscued!"; }; class HostageLost { title = "The Hostages got rescued!"; subtitle = ""; description = "Time to go AWOL your surely lose you head for this"; }; class DeadLost { title = "Your extraction team got wiped out!"; subtitle = ""; description = "No dinner at home tonight for the hostages."; }; class DeadWon { title = "The extraction team was eliminated"; subtitle = ""; description = "Order more bread and water for the infedel captives"; }; }; Cheers Larrow, much appreciated. I'll give it a try. Share this post Link to post Share on other sites
jinker 20 Posted May 6, 2014 The colors are RGB so, R,G,B. 1.0,0.0,0.0 would be red. 0.0,1.0,0.0 would be green and 0.0,0.0,1.0 would be blue. The last number is alpha or transparency. Share this post Link to post Share on other sites
carpetburns 10 Posted May 2, 2015 Cheers Larrow, much appreciated. I'll give it a try. ChunkyTomato, did you get this to work? If so where did you put the first bit of code, the _endGameThread part? Thanks for any help. Share this post Link to post Share on other sites
the_uberzer 0 Posted May 25, 2018 On 5/2/2015 at 12:52 PM, carpetburns said: ChunkyTomato, did you get this to work? If so where did you put the first bit of code, the _endGameThread part? Thanks for any help. Were you able to figure this out? Share this post Link to post Share on other sites