Janat 10 Posted December 5, 2010 (edited) When the player dies in SP mission, I'd want the screen to fade black and then end the mission. Is this possible? Edited December 6, 2010 by Janat Share this post Link to post Share on other sites
MeIvin 10 Posted December 5, 2010 Hello. Yes it's possible. http://forums.bistudio.com/showthread.php?t=109926 Kind Regards Melvin Share this post Link to post Share on other sites
Janat 10 Posted December 5, 2010 Thanks. But now if I wanted the mission to end only after a certain trigger has been activated, and if player dies before the trigger's been activated the default menu with revert and abort options shows up. Would that be possible? Share this post Link to post Share on other sites
MeIvin 10 Posted December 5, 2010 Thanks. But now if I wanted the mission to end only after a certain trigger has been activated, and if player dies before the trigger's been activated the default menu with revert and abort options shows up. Would that be possible? Hello. In the trigger you want to have activated first put a variable (ie. cheesecake) true. onAct: cheesecake = true; then in the ending trigger put condition: !(alive player) AND cheesecake or whatever you had there already and add AND cheesecake. Regards Melvin Share this post Link to post Share on other sites
Janat 10 Posted December 5, 2010 (edited) Hello.In the trigger you want to have activated first put a variable (ie. cheesecake) true. onAct: cheesecake = true; then in the ending trigger put condition: !(alive player) AND cheesecake or whatever you had there already and add AND cheesecake. Regards Melvin I did so but the mission doesn't end. You just die normally. There's no debriefing. That's why I came to ask about it here. Though I've only tried it in editor, maybe it indeed works outside of editor? I don't know and can't try right now. Edited December 5, 2010 by Janat Share this post Link to post Share on other sites
MeIvin 10 Posted December 5, 2010 Hello. I'm wondering, did you read the other post? Because I think it explains the exact problem you have. Or maybe I didn't understand the post I linked. I think I did though :) Kind Regards Melvin Share this post Link to post Share on other sites
Janat 10 Posted December 5, 2010 I have to admit that I read it very quickly and didn't see all those important bits. Now I think I know how to do it. Share this post Link to post Share on other sites
Janat 10 Posted December 6, 2010 After experimenting a little bit, I can't get my onPlayerKilled.sqs work properly. I have tried this script: titleCut ["","BLACK OUT",5] 5 fadeMusic 0 ~7 if outroo then endMission "END1" else enableEndDialog exit But regardless of whether "outroo" is true or false, mission ends. I've also tried outroo == true and outroo = true in place of outroo, but none of them work. On the other hand, this script always gives the revert menu, no matter what "outroo" status is. enableEndDialog titleCut ["","BLACK OUT",5] 5 fadeMusic 0 ~7 if outroo then endMission "END1" exit Also tried this but it didn't work at all. No dialog what so ever, I had to alt-F4 out of the game. titleCut ["","BLACK OUT",5] 5 fadeMusic 0 ~7 ? outroo: endMission "END1" ? !outroo: enableEndDialog exit Share this post Link to post Share on other sites
Janat 10 Posted December 7, 2010 No one knows what's wrong with my script? Share this post Link to post Share on other sites
zwobot 22 Posted December 8, 2010 I can't verify this in the editor right now but my guess is there are some brackets missing in your if .. then statement: if (outroo) then {endMission "END1";} // maybe you even have to use if {...} instead of if (...) - not sure about the syntax right now In addition I think you are not supposed to actually use the endMission command. Instead you should use a boolean variable in conjunction with an end trigger in the editor and the variable as condition. Share this post Link to post Share on other sites
Janat 10 Posted December 8, 2010 (edited) I can't verify this in the editor right now but my guess is there are some brackets missing in your if .. then statement: if (outroo) then {endMission "END1";} // maybe you even have to use if {...} instead of if (...) - not sure about the syntax right now In addition I think you are not supposed to actually use the endMission command. Instead you should use a boolean variable in conjunction with an end trigger in the editor and the variable as condition. Doesn't work with those brackets either. Also, I now have onPlayerKilled.sqs with execVM "onPlayerKilled.sqf" and onPlayerKilled.sqf with this script: titleCut ["","BLACK OUT",5]; 5 fadeMusic 0; sleep 7; if (outroo == false) then { enableEndDialog; } else { endMission "END1"; }; And using it I have to alt-F4 out of the game. EndMission should work in scripts. Never mind I got it working using sqs: titleCut ["","BLACK OUT",5] 5 fadeMusic 0 ~7 if outroo then {endMission "LOSER"} else {enableEndDialog} Also sqf version works too titleCut ["","BLACK OUT",5]; 5 fadeMusic 0; if outroo then { sleep 7; endMission "END1"; } else { enableEndDialog; }; Edited December 8, 2010 by Janat Share this post Link to post Share on other sites
zwobot 22 Posted December 8, 2010 Sorry, I might have confused the endMission with forceEnd... Share this post Link to post Share on other sites