Comments (2)
Thank you. I didn't know about the -1 interval. I will surely use it straight away as it makes more sense than my arbitrary 0.01 lol.
As of the performance improvements i need some time to test it but i'm sure it will work.
Btw i was thinking of implementing something similar to what you did but inside a dedicated think function of a dummy entity. Maybe doing it like i do in the bots main think function by splitting the work into several sub functions.
For example FuncI = 1 would refresh the common infected, FuncI = 2 to refresh the weapons, FuncI = 3 for the cleaning and so on.
Also, probably we can improve it even more by finding the weapon id ( Left4Utils.GetWeaponId(ent) ) directly in this weapons refresh function so to remove it from the bots think func. And maybe we could also check the distance between the common/weapon and the bots and only add them to the lists if whithin a certain range. Though i'm not sure it would make sense for the commons considering that the director already spawns them near the survivors.
Anyway i will try to come up with something and i will post it here so we can try to improve it together.
from left4bots.
Initially, I used "logic_timer" instead of "thinkfunc" for looping, but the “OnTimer” output of "logic_timer" is based on I/O events, which will cause time inconsistency. I tested it for a while and was still not satisfied. Only a few days ago I found more detailed information on the TF2 wiki, and this problem was solved.
About check distance, I guess that would be possible for weapons bucause they don't move.
But the infected are always moving, and the distance still needs to be checked again when the bot needs to deal with them. And they get killed frequently, need updates list often, and the number of infected isn't too many, so I think it's better to let bot deal with them.
Now that the bots can think faster, I think it's time to complete the aiming function, when I finish it I'll open a new issue.
from left4bots.
Related Issues (20)
- The full version of left 4 bots 2 works on second restart by either vote to restart or failing the chapter while the alpha version works fine with this mod HOT 1
- hey can u add a feature where when playing with friends they can also control the bots? it sucks when only 2 person can control them HOT 2
- Automation scripts for Swamp Fever official campaign
- "Dodge" pipe_bomb_projectile
- Automation scripts for Death Toll official campaign HOT 1
- Bots close saferoom door HOT 1
- Player survivors getting force-swapped away from pills/adrenaline after pickup HOT 3
- Fix bot shooting nervously sitting witch HOT 1
- Fix pick up melee loop HOT 5
- When swapping your weapon with the bot, you'll find that it has no ammo. HOT 5
- When one bot is incapacitated, the others always try to heal it and die HOT 4
- Fix bots stuck in pickup loop HOT 5
- "fall_velocity_warp" not work since last release HOT 3
- Bots run back to human after unpause lead order HOT 1
- About "lead_pause_behind_dist" setting HOT 1
- Dedicated Server Crash on Shutdown HOT 4
- [IMPROVEMENT] Manual Attack Optimization HOT 3
- Warp doesn't work after level change on latest github version HOT 1
- [fix] Hooks not work sometimes after last update HOT 29
- [Suggestion] Bots use medkit immediately in "black and white" condition.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from left4bots.