![]() |
Button usage works!!!!
YEEEEEHAW. Well i gtg for lunch. But i will give you a simple 'tutorial' how to get the buttonized doors working.
I got them working. DE_RATS works great , (CT side). I will quickly try de_prodigy and such as well. One downside: the elevator in cs_siege is a sort of func_door, so its very hard to make bots use that elevator well... Anyway, it works! I GOT THEM USING BUTTONS!!! ahum. |
Re: Button usage works!!!!
wow please talk to PMB about this.........i just asked to to do something about a USE flag or something to get them to use them correctly......
what did you do????? i think all elevators are func_doors. i made one im my maps cs_soulcity/as_slum(sequels hehe)...but its small(short)......and bots hit that button even when they dont intend to use the 'vator and often die under it getting crushed. if they do it from above they seem to handle it well...but mine is just a square platform and not a "cage" like in cs_siege. |
Re: Button usage works!!!!
huh got what using buttons :O real bot or pod bot with waypoints ? :P
|
Re: Button usage works!!!!
Okay, i am back.
Button usage is actually not hard to do, you just have to know what to read. Requirements (what should your bot have already): - pathfinder - some sort of 'main goal' reminder (so it knows its actual goal) - method to change the path to a temporarily goal - a path_walk function Okay: I will show all my pieces of code and explain what i do. Most stuff happens in path_walk(). And in my case i handle different situations. I handle 'close to node' first, then i handle walking to the node, and then i handle stuck situations: order: - close to node? (YES-> go to next node, exit function) - close to node? (NO-> walk to node, perform nescesary actions (swim/jump/duck) - stuck? (should walk?) When checking if we are close to the node we head for (or waypoint), i fire a tracehull. You can recieve the traceresult there to know if the path is going THROUGH an entity. Most of the time it will be a func_door or a func_door_rotating without button usage, and you just handle doors as you normally do. In this case you have to know a bit more about the door. So, in code: Code:
edict_t *pEntityHit = NULL; In my 'get stuck' part. I first check if my bot should move (perhaps its camping, so its normal and thus not stuck!). This is set in bShouldMove. After that my check for the entity happens: Code:
// When blocked by an entity, we should figure out why: - hit by an entity: - figure out classname - when classname is a door type (func_door or func_door_rotating, func_wall is questionable? (MAPPERS??)). - figure out the targetname of this door. - find a func_button with the same TARGET as the doors TARGETNAME (they are linked) - be sure you can reach this button - create a path to it - remember its entity you need to remember this entity so you can override your 'head looking' with it. At the very top (before my NEARNODE check) i have this code: Code:
// when pButtonEdict is filled in, we check if we are close! In overall: it took me 1 hour to get it working basicly. It is not hard to implement, it does not require special moves, so in theory its even easier than ladder usage ;) |
Re: Button usage works!!!!
thats great stuff stefan
when will your easter egg become playable, that feature would maka my favourite map fully bot playable (cs_bigbrother_beta1) :) |
Re: Button usage works!!!!
well. I don't know ;)
Also, the new rb is more strict in what is walkable or not. So sometime syou have to manually create some connections to get doors working properly. But thats just a minor thing. You can still distribute your RBN file properly. I will now test it with de_prodigy, i do not expect problems though :) |
Re: Button usage works!!!!
Bravo Stefan!
This code will come in handy soon in RACC :) |
Re: Button usage works!!!!
thx all.
Notice: de_prodigy does NOT use a func_door and func_button relationship. I am currently working on my code to make this work as well: de_prodigy (and likely some more maps...) use trigger_multiple. I think its an area which the entity has to touch in order to 'open' or to 'activate' something. In this case de_prodigy has 3 doors for sure that work like BS. the 2 doors you have to go through as a terrorist, both use trigger_multiple to get them open. The 3rd door needs a button search, so i have to change the search that it will also find trigger_multiple stuff. For the moment it can find this entity and its target, but the traceline fails. I am going to figure out why, perhaps its because i have ignore_monsters. Or perhaps due something else. But i am close to get this working. When it does, i post my updated code here :) |
Re: Button usage works!!!!
that system looks pretty similar to old joebot's one :)
|
Re: Button usage works!!!!
:)
i figured de_prodigy is a pain in the ass. So far the bot can go from the inside to the outside using the button. But when going from the outside, the button is somehow 'not detectable'. As if it is not hit by a traceline or whatever. I use tracehull now for that, but it still does not seem to be detected? |
All times are GMT +2. The time now is 18:53. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.