![]() |
Re: Need some help with pickup pistols
Yep.
Translate your code in english words, and try following the logic. You'll see something's wrong here. |
Re: Need some help with pickup pistols
At last I now know where I wrong but I don't know that will I find a way to fix it. However my mistake is this else between Secondary weapon and Primary weapon. I translate the code and the mistake is - for a primary weapon "if (f_item_distance<50) then pickup secondary weapon but(the error) else if (f_item_distance<50) is not "<50" then pickup primary weapon. I think that this is the reason that make the bots to drop his weapons from very big distance before the reach the weapon.
Now I will try to fix it. Thanks to all who help me :) |
Re: Need some help with pickup pistols
btw, bear in mind that the origin of the weapon isnt the origin of the weapon entity, but the origin of the weaponbox entity owning the weapon ... dunno if that's right in your code.
but as I said, I think you gotta have to figure that out for yourself. this might take some dozens of hours, but that's like we all began |
Re: Need some help with pickup pistols
Actually I would suggest him to completely rewrite this weapon pickup code from scratch. That's the best way to understand how it works ;)
|
Re: Need some help with pickup pistols
I guess that's where you gonna be after having spent dozens of hours on such a rather little piece of code :)
|
Re: Need some help with pickup pistols
Oh at last now the bots pickup primary and secondary weapons perfect.
I do this that you tell me to PMB I rewrite the pickup code from the scratch and I find my mistakes. Thanks to all who help me with this think. The new version off the bots will be poblished after I fix anoder small bug - the bots don't buy armor and granedes. Maybe this is from the new buy code. However this will be very soon fixed :). |
All times are GMT +2. The time now is 23:18. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.