![]() |
[Bot coding question]Cpl. Shrike need you help for the enfield and enfields weapon ID
Sorry for posting this question in this forum since I think you will look at this forum more offen.
For DoD 1.1 the british weapon enfield/enfields(scope) was the same weapon ID 25 and the fg42/fg42s(scope) use the same ID 23 , I think I have to use the iAmmoClip state to detect them correctly but I have no idea how to code, so I just ingore it at that moment since the default one is always enfield if I use ID 25, that mean bot can't use scope enfield but not a big problem for me. But start from DoD 1.2/Steam the default one have changed to enfield scope if I use ID 25, so I can't ingore it anymore since bot can't use enfield now, Shrike do you have idea how to solve this problem ? BTW I still don't know how to output the debug bot.txt under HPB_bot_Metamod, so I use back the non mm version to output the bot.txt at the moment, however I notice the weapon output part of DoD 1.2/Steam is very difference than DoD 1.1, I can't find any detail weapon information now ! Now the output look like the following, do you have the same problem or am I did something wrong ? (DoD 1.2/Steam) pfnRemoveEntity: 3e36298 pfnPvAllocEntPrivateData: pfnCreateNamedEntity: edict=3e36298 name=weapon_enfield pfnPrecacheModel: models/v_enfield.mdl pfnPrecacheModel: models/w_enfield.mdl pfnPrecacheEvent: pfnPrecacheSound: weapons/enfield_shoot.wav pfnPrecacheSound: weapons/357_cock1.wav pfnPrecacheSound: weapons/boltforward.wav pfnPrecacheSound: weapons/boltback.wav pfnPrecacheSound: weapons/tommy_reload_clipin.wav pfnPrecacheModel: models/v_enfield_scoped.mdl pfnPrecacheModel: models/w_enfield_scoped.mdl pfnPrecacheSound: weapons/enfieldsniper_shoot.wav pfnPrecacheEvent: (DoD 1.1) pfnMessageBegin: edict=1de6594 dest=1 type=76 pfnWriteString: weapon_luger pfnWriteByte: 4 pfnWriteByte: 24 pfnWriteByte: -1 pfnWriteByte: -1 pfnWriteByte: 1 pfnWriteByte: 1 pfnWriteByte: 4 pfnWriteByte: 64 pfnWriteByte: 8 pfnMessageEnd: |
Re: [Bot coding question]Cpl. Shrike need you help for the enfield and enfields weapon ID
For question one I think I'll use models/w_enfield_scoped.mdl to solve it. :)
|
Re: [Bot coding question]Cpl. Shrike need you help for the enfield and enfields weapo
Quote:
Im not coding a plugin. But in the normal hpb_bot it is located in the "day of defeat" folder. \steam\steamapps\day of defeat\HPB_bot.txt Now for the enfield en fg42. I solved it by checking the weapon model. pEntity->v.weaponmodel You'll have to look at the p_ models not the w_ or v_ models p_enfield.mdl and p_enfields.mdl p_fg42bu.mdl and p_fg42s.mdl You'll actually have to check the player entities model and not the weapon it self. although that would work on some guns. Ammo clips won't work either because they are the same to. It's only the scope that is different. The weapon number is not consistent through out the dod versions. So that's not really a good way to check (as you have seen yr self) |
Re: [Bot coding question]Cpl. Shrike need you help for the enfield and enfields weapon ID
Yep, just have a test, detect model did solved the problem. Now I use model for enfields and fg42s, and the rest use weapon ID, everything okay again. :) BTW Shrike do you notice the DoD 1.2 debug.txt (bot.txt) is a lot difference than the DoD 1.1 like I mention in the above post ?
|
Re: [Bot coding question]Cpl. Shrike need you help for the enfield and enfields weapo
Umm no not really except that some values has changed and or added.
|
All times are GMT +2. The time now is 19:21. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.