English How does the move hook work

3 replies
Goto Page
To the start Previous 1 Next To the start
01.12.22 06:44:03 pm
Up
Mami Tomoe
User
Offline Off
How exactly does it work?

Does it get triggered based on server ticks? Or client frames?
Does it have a cap of some sort?
Does speed modifications influence how many times it can trigger per X duration?

Does -25 speedmod vs 100 speedmod affect how fast my move hook will trigger?
Does a player with 100 speedmod trigger it more often?
From my experience, speedmod has no impact, so does it trigger by frames? But who's?
It's hard being the best girl in the whole entire world
01.12.22 07:46:10 pm
Up
DC
Admin
Offline Off
It's complicated because of our friend the internet.

in general:
cs2d lua hook move is (in theory) limited to max 1 movement per frame (client frame rate). Based on network conditions it may trigger more often or less often. It also triggers less often depending on client settings (cs2d cmd connection 0 and 1 will reduce the rate with which the client sends movements to the server).

Does it get triggered based on server ticks? Or client frames?
> client sends a network package (max once per frame), server processes it at its own frame rate as soon as it arrives. So the answer is: Triggered by client frames but server frames also have an impact.

Does it have a cap of some sort?
> under perfect network conditions and with cs2d cmd connection set to 2 (on client side) the - theoretical - cap is 1 time per client frame. In practice it may be called more often (e.g. after network congestion / lag)

Does speed modifications influence how many times it can trigger per X duration?
Does -25 speedmod vs 100 speedmod affect how fast my move hook will trigger?
Does a player with 100 speedmod trigger it more often?

> No, not at all. speedmod has zero impact on how often it is called. If player's can't move anymore at all (because of super low speedmod values) I THINK the hook won't be invoked anymore - but I'm not entirely sure.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
02.12.22 01:00:02 pm
Up
Mami Tomoe
User
Offline Off
How does cs2d cmd connection work?

It seems that the client can't execute it.
connection 0

Code:
1
ERROR: Unknown command '0' (connection 0). Maybe missing quotes? Reference at CS2D.com/help


But,
connection speed
, prints nothing?

Yet
connection speed 0
also doesn't work.

And it also seems to have been removed from the
Net
tab of the options menu for the client.

Printing
game('connection')
prints
2
which I assume is the default, but how does one change it?
It's hard being the best girl in the whole entire world
02.12.22 01:48:22 pm
Up
DC
Admin
Offline Off
Oh, sorry. I forgot that connection has been removed with v1.0.0.2 already. So you can ignore that part.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
To the start Previous 1 Next To the start