Abort delay on death

This is working very nicely. Often players will say 'Why can't I abort?' (or something similar) when they die. Is there a way to display a hint for the player to see?

This shows they're in combat
Code:
cutText ["Cannot Abort while in combat!", "PLAIN DOWN"];
This shows they need to wait X seconds, and counts down
Code:
cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
I can't get any text to appear when a player dies though. I've tried these (not all at once obviously):
Code:
cutText [format ["Can Abort in %1", (_timeMaxDead - _timeOutDead)], "PLAIN DOWN"];
titleText [format ["Can Abort in %1", (_timeMaxDead - _timeOutDead)], "PLAIN DOWN"];
hint "Press 'Esc' and wait for the \nAbort button to activate.";

The cutText and titleText seem to appear, but only once you close the menu (press Esc again), meaning that the countdown stops and their function is useless. This doesn't happen with cutText when you are not dead, and it will display correctly whilst the Esc menu is open. Does this have something to do with the death screen/image? Is there a way around it?


Hmmm, that actually gave me and Idea... ;)
Problem is that the DeathScreen probably overlaps all the cuttext's, hint's etc. But we can do this the other way.
in player_death.sqf after:

Code:
TitleText[localize "str_player_12","PLAIN DOWN",5];

Add something like this:

Code:
_deathtxt = "<t color='#ff0000' size='1.6' shadow='1' shadowColor='#000000' align='center'>Press 'Esc' and wait for the Abort button to activate.</t>";
hint parseText (_deathtxt);

and voilà ;)
 
Code:
_deathtxt = "<t color='#ff0000' size='1.6' shadow='1' shadowColor='#000000' align='center'>Press 'Esc' and wait for the Abort button to activate.</t>";
hint parseText (_deathtxt);

and voilà ;)

Perfect. This works great, although I think I'll change the red text to white :D I'm going to implement this immediately.
 
Still having some issues (rarely) with spawning in with broken legs etc. I have changed the abort timer to 10 seconds after death but this does not seem to always be enough. I'm going to try changing this to 20 seconds and we'll see how that goes. Also, if you want to force players to always wait before logging out change the top line of this;
Code:
 case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 50]) > 0) : {
                    _btnAbort ctrlEnable false;
                    cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
                    _timeOut = _timeOut + 1;
 
                };

to
Code:
 case (_timeOut < _timeMax) : {
if that doesn't work for you try
Code:
 case (_timeOut < _timeMax && 0 == 0) : {
 
Thanks everyone for the information in this thread, I got it working. I have a feeling I'm going to have to do what Althasil did for the abort delay hint, for the players.

Just wanted to thank all of the unsung devs!

-CRAFT
 
Not sure why it didn't work at first but it is now showing the hint in the corner when you die. Is there no way to add like what the combat timer displays? So when players press ESC it will show a message that counts down to avoid confusion when people don't read the hint and freak out?
 
Back
Top