I'm still a newbie to Nextbots, so forgive me if any of this stuff is blatantly obvious.
Firstly, anyone have a decent way to explain how the function "UpdateBehavior" works?
I get what's it's supposed to do, but i don't really understand the syntax for it, so i'm not sure how to use it in my code.
Secondly, a simple way to stop an animation? I'm working with a running animation, and it continues playing for a short time when the bot enters melee range
Thirdly, a "PlaySoundAndWait" function that doesn't call for "coroutine.wait()" because that doesn't seem to work anywhere except the "RunBehavior" chunk
Fourthly, is it possible to specify who a Nextbot will react to when "OnOtherKilled" is called? For example, i want my Nextbots to say "ally is down" when one of their kind is killed, but say "target is down" when anyone else (including player) is killed.
Lastly, mostly for reference, and a simple yes or no will suffice. Is it possible to get Nextbots to communicate battle information (like health, state, or target location) to one another?
i don't mean to bump, but i'm kinda interested in getting answers to these.
1. Don't really know what function you mean but just check the sourcecode: [url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/base/entities/entities/base_nextbot/sv_nextbot.lua[/url]
2./ 3. Unfortunately garry only implemented the most useless functions ever. To achieve that you have to basically recode the function and add your own code that checks for melee range, etc. before the coroutine.yield
4. Yes override the function in your bot's class.
5.Yes
Sorry, you need to Log In to post a reply to this thread.