Forum

> > CS2D > Scripts > Bots fake ping/Latency ?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Bots fake ping/Latency ?

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: Bots fake ping/Latency ?

DC
Admin Off Offline

Zitieren
The bots in CS2D are fully Lua-scripted. You can find the scripts in the "bots"-folder in your CS2D folder. Of course it depends on what you mean with "fake latency" but if you're talking about just delaying stuff it's easily possible. Actually the code is already full of little timers/countdowns to artificially delay stuff. Otherwise the bots would simply be too good. Well... at least in aiming and shooting. Of course they are still pretty stupid and predictable because the AI code is very basic and simple.

Hint: Change the bot skill (backspace in-game and then "Change Skills") if you want to try higher (low skills) or lower (high skills) delays.

Edit: Oh... I'm not sure if the skills actually make much difference... They don't seem to be used in the script. Maybe in the API functions which are called by the script...

alt Re: Bots fake ping/Latency ?

GeoB99
Moderator Off Offline

Zitieren
High latency for bots in networking terms is absolutely impossible as they're AI and handled by some APIs and CPU. But you can perform the phenomenon of delay moving typical of laggy players (which you seem to go backwards by few tiles) to bots. Firstly, you must create two variables as Xpos and Ypos and assign them with math.random. Now, use cs2d lua cmd player and check if the player (see the player function reference) is truly a bot.

Afterwards, use cs2d cmd setpos, the X position parameter must be assigned with Xpos and Y with Ypos. Of course, those positions mustn't be pretty random (like teleporting in random places of a map) so I guess you should take a look at the Math Library for further functions and such.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht