Forum

> > CS2D > Scripts > Round Ending Delay
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Round Ending Delay

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Round Ending Delay

Mami Tomoe
User Off Offline

Zitieren
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!
1× editiert, zuletzt 01.06.21 04:07:43

alt Re: Round Ending Delay

DC
Admin On Online

Zitieren
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.

alt Re: Round Ending Delay

Mami Tomoe
User Off Offline

Zitieren
@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...
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht