Forum

> > CS2D > Scripts > Round Ending Delay
Forums overviewCS2D overview Scripts overviewLog in to reply

English Round Ending Delay

2 replies
To the start Previous 1 Next To the start

old Round Ending Delay

Mami Tomoe
User Off Offline

Quote
Is this the right amount of time it takes for each round ending type to actually end the round? (Between the cs2d lua hook endround beign called and the round actually ending.)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
TERRORIST WIN			= 5 
COUNTER TERRORIST WIN		= 5 
DRAW					= 5 
GAME COMMENCING			= 3 
RESTART					= 0
VIP KILLED				= 5 
VIP ESCAPED				= 5 
VIP DID NOT ESCAPE			= 5 
BOMB DETONATED			= 5 
BOMB DEFUSED				= 5 
BOMBSITE PROTECTED		= 5 
HOSTAGES PROTECTED		= 5 
HOSTAGES RESCUED			= 5 
BLUE FLAG CAPTURED		= 5 
RED FLAG CAPTURED			= 5 
ALL POINTS DOMINATED BY T	= 5 
ALL POINTS DOMINATED BY CT	= 5 
ALL HUMANS KILLED			= 5 
SURVIVORS SURVIVED		= 5
In seconds.

I need exact precision, thank you.

EDIT:
I also suspect that some of those may have varying time, mostly the game commencing one, but the round draw is also suspicious.

I'm trying to create an artifical cs2d lua hook post_endround hook, for that I need the exact time it takes for a round to end, so I can call my function just before the round initialises.

Thank you!
edited 1×, last 01.06.21 04:07:43 am

old Re: Round Ending Delay

DC
Admin Off Offline

Quote
Sorry but the delay is sometimes 3 and sometimes 5 seconds even for the same round restart type.

Also there is cs2d cmd restartround and cs2d entity func_gameaction which both can trigger restarts with custom delays.

To make things even worse: Even when using the right timings your plan might not work properly. It depends on how/when CS2D checks Lua timers and the round system timers. It may happen that your timer gets called after the round was restarted.

I added the ideas for a "post_endround"-hook and an additional parameter (restart delay) for cs2d lua hook endround to my todo list. Can't promise that this will be added any time soon.

old Re: Round Ending Delay

Mami Tomoe
User Off Offline

Quote
@user DC: The cs2d cmd restart command's delay doesn't actually call the cs2d cmd endround hook, it will only call it once the round was restarted (when timer is over).
I would suppose the trigger does the same thing (but I don't really care since I don't use it).

I plan to call the function about 10 milliseconds prior to the time when the round ends.

Thanks for adding the new hook though.
I also hope you'll fix the ordering in the bug report I previously mentioned...
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview