Quote:
Originally Posted by red_dots
First I am looking to make the bot code with OOP. I know this can be done but would it be possible to start adding classes to botmans template and slowly convert everything over that would be converted without breaking the code? I would like to start by makeing a bot class that I use for the bots thinking. Then I would like to be able to compile the bot and test it after I get combat or something converted over without changeing all the other stuff (nav, looking for items, etc.) Not sure if this is the best example as I am just learning the bot code but it should get the point across.
|
That is exactly what I was doing. I started with botman's code and I transformed it into Classes (well I never tried to convert botman's bot waypoints and pBot structure, I made my own) It can be done.
You can dl my code at
http://sourceforge.net/projects/kxbot
(It's far from finished but you can see how I used OOP. working under CS 1.5, it only has support for spawning bot, joining team, buying waepons, talking, moving and turning)