When the player dies in SP mission, I'd want the screen to fade black and then end the mission. Is this possible?
When the player dies in SP mission, I'd want the screen to fade black and then end the mission. Is this possible?
Last edited by Janat; Dec 6 2010 at 15:54.
Hello.
Yes it's possible.
http://forums.bistudio.com/showthread.php?t=109926
Kind Regards
Melvin
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?
Last edited by Janat; Dec 5 2010 at 14:23.
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
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.
After experimenting a little bit, I can't get my onPlayerKilled.sqs work properly. I have tried this script:
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.Code:titleCut ["","BLACK OUT",5] 5 fadeMusic 0 ~7 if outroo then endMission "END1" else enableEndDialog exit
On the other hand, this script always gives the revert menu, no matter what "outroo" status is.
Also tried this but it didn't work at all. No dialog what so ever, I had to alt-F4 out of the game.Code:enableEndDialog titleCut ["","BLACK OUT",5] 5 fadeMusic 0 ~7 if outroo then endMission "END1" exit
Code:titleCut ["","BLACK OUT",5] 5 fadeMusic 0 ~7 ? outroo: endMission "END1" ? !outroo: enableEndDialog exit
No one knows what's wrong with my script?
I can't verify this in the editor right now but my guess is there are some brackets missing in your if .. then statement:
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.Code:if (outroo) then {endMission "END1";} // maybe you even have to use if {...} instead of if (...) - not sure about the syntax right now