Suicidal tendencies of the Botmanīs BOT#1o
Hi. First of all I know that this BOT is almost 10 years old, but it works perfectly for my MOD...
http://www.moddb.com/mods/zion-warcry ...except for the fact that they have a serious and stupid suicidal tendencies. I have tried to use the code in the BOTīs source which is used to find walls, but with no luck. Code:
BOOL CBot::BotChecFloor( void ) What should I do?. Any help will be added to the credits. :thumbup: Thanks in anticipation. |
Re: Suicidal tendencies of the Botmanīs BOT#1o
Quote:
This code is either for waypointless navigation or for another reason. What is done after and before this function is called? How does a bot know when to stop or move forward? Better waypointless navigation can be foound in RACC bot source or try old RCBot1 source for ideas. |
Re: Suicidal tendencies of the Botmanīs BOT#1o
Hi!. No, I donīt use waypoints. Bot#10 uses a navigation system without nodes or waypoints. This function is called inside BotThink function, where itīs used to check if thereīs a wall or, in this case, floor with which interact.
In theory, the bot stops its movement if it find a wall in a certain degree based on its line of sight. For the floor, as you can see, Iīm quite lost.:confused: Aniway, would it be a better approach to make it avoid a dangerous func_x like a trigger_hurt?, I am now studying how to code it (Iīm totally noob at this :sweatdrop: ), but any help will be much appreciated :helpsmilie: Thanks for replying!! |
Re: Suicidal tendencies of the Botmanīs BOT#1o
as far as I'm aware botman never implemented any non-waypoint navigation code except for very basic waypointless navigation, unless I'm mistaken.
What PMB and I did for RACC bot and RCBot respectively was to take several tracelines across the bots field of view and choose to go down the path which had the longest distance to any wall. It's a basic technique used in carpet cleaning bots and in webots for example. From my own understanding, this function that you've shown, doesn't do anything useful for bots to avoid falling. Imagine this scenario BotChecFloor() = true : okay move forward BotChecFloor() = true : okay move forward BotChecFloor() = true : okay move forward BotChecFloor() = true : okay move forward (bot has already fallen off floor now) BotChecFloor() = false: okay turn or stop (bot is falling and can't turn or stop) (bot dies) as you can see BotChecFloor will return true even if the bot is eventually going to fall, so it's not a useful function for this. you need to check the floor in front of the bot not directly below the bot. example Code:
BOOL CBot::BotChecFloor( void ) Code:
O -. Code:
O |
Re: Suicidal tendencies of the Botmanīs BOT#1o
OMG!, I repeat that I was quite lost in coding, 7 years are much for an already noob to left C++ books on a shelf...:blushing:
Trying to avoid my bots from killing themselves I created a better way to make them die...0_o Iīl l put your function on my code, and put here the results!! :) If it works, man, youīll be on the v2.0 credits!! :thumbsup: EDIT: Tested... unfortunately, they still throw themselves to the void.. Iīll keep trying poking a bit with your code !! :) |
Re: Suicidal tendencies of the Botmanīs BOT#1o
Sorry there's a bug in the code
Try Code:
BOOL CBot::BotChecFloor( void ) Ps:You'll need to show me the decision the bot takes after you call this function |
Re: Suicidal tendencies of the Botmanīs BOT#1o
Ok!, I have tested and tested yesterday and I finished thinking that I was an absolute moron for not making it work...
The actions that the Bot will do after this function is called are: 1st. Turn (randomly) 45-60 degrees (randomly) to its right or left side 2nd. Pause 1 second 3rd. Start walking again. If it is engaged in combat it wonīt walk, unless its armor or health (engine) is low, so it will search for a func_reloader (wall mounted health charger. In my mod Iīve gave it a model and some other capabilities). You can see it under the central tower (so I want the bots wonīt fall to the void when they start walking towards the reloaders from the external circle of the dock). http://media.moddb.com/images/mods/1/7/6540/67216.jpg Actually Iīm starting from scratch using the old source (bot.cpp and bot_combat.cpp ) all (c) Botman, modified to fit ZWC, because for one reason I cannot understand, the bots make the game crash again (I have probably touched something relative to one pointer or similar :unsure: ) Also Iīm curious on how to make the Bot search team mates and make groups of three, but this is, by now, something impossible to me :blushing:, Iīm now studying HPBpt source and also PODBot source to see how I should do it. :helpsmilie: Thanks again, Iīll post the testing results as soon as I re-compile the zwc source :thumbsup: |
All times are GMT +2. The time now is 17:39. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.