IPB

Welcome Guest ( Log In | Register )

> Finally bots can fire SMG Grenade and AR2 Ball ...etc, i added some codes of the secondary firing mode
Salvax
post Feb 21 2007, 06:14 PM
Post #1


Advanced Member
***

Group: Members
Posts: 75
Joined: 14-February 07
Member No.: 1,034



hmmm, thx Captain Cheeseh !!! Thank u for ur infinite patiance and greate instructions. U r the hero !

I just add some codes so bot can fire SMG Grenade and AR2 Ball and throw Grenade by right clicking mouse smile.gif

and i also made a map(named Salvax , full of Ar2 guns , Ar2 balls , SMG guns and SMG grenades), so i can test if my code works, and i biult a new DLL , it works.

PLZ download it at the bottom of my post and test, THX !

________________________
modified file list:
bot.cpp
bot.h
bot_buttons.cpp
bot_buttons.h
bot_task.cpp
bot_weapons.h

some pictures from my testing map with bots:

http://ihost-images.biz/i/finally!!!1.JPG
http://ihost-images.biz/i/finally!!!2.JPG
http://ihost-images.biz/i/finally!!!3.JPG

and i got a small question about the length unit in ur source files , e.g.:

bot_weapons.h - line 166 to line 171
QUOTE
// shoot distance (default)
m_fPrimMinWeaponShootDist = 0.0f;
m_fPrimMaxWeaponShootDist = 8192.0f;

m_fSecMinWeaponShootDist = 0.0f;
m_fSecMaxWeaponShootDist = 2048.0f; // SMG Grenade & AR2 Ball for BOT by Salvax


i donot know what 8192.0f exactly means in Source SDK mapping ...so i donot know how to set the value of

QUOTE
m_fSecMinWeaponShootDist = ???f;
m_fSecMaxWeaponShootDist = ???f;


i wanna know 1000f in source file = X*1024 in SDK mapping, X=?

and a small problem about the holding button time and letgo time, i dont know what the value in ur source exactlly means : e.g.

bot.cpp - line 1109 to 1124

QUOTE
void CBot :: primaryAttack ()
{
float fLetGoTime = 0.15;

// not currently in "letting go" stage?
if ( m_pButtons->canPressButton(IN_ATTACK) )
{
m_pButtons->holdButton
(
IN_ATTACK,
0/* reaction time? (time to press)*/,
0.12/* hold time*/,
fLetGoTime/*let go time*/
);
}
}


I wanna know the time value, for example 0.12/* hold time*/ = ? seconds


plz help me, Captain ! THX !


_______________________________
File Name: rcbot2_test_only_feb22.rar
Size: 248KB |
Download Link: http://www.sendspace.com/file/3363wq
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
Cheeseh
post Feb 21 2007, 08:56 PM
Post #2


Admin
*****

Group: Admin
Posts: 3,066
Joined: 11-September 03
From: uk
Member No.: 1



hold time = the amount of time the button is held
let go time = the amount of time the button is let go after it is held.

it can be anything, just make it useful. A short let go time and short hold time is useful for secondary attack. How long do you hold in the secondary attack to fire an smg grenade ? not long. Do you need to let go of the button and for how long (let go time)?

also the bot weapon code isn't implemented into the actual bot. You will notice that The CBotWeapons (m_pWeapons) class isn't actually used at all, it's just created and deleted, its there for future use once all weapon code can be done. (All the m_fSecMinWeaponShootDist stuff isn't even used, not even the primary stuff yet) so no need to even look at it right now.

QUOTE

File Name: rcbot2_preview_feb22.rar (including test map:salvax)
Size: 241KB |
Download Link: http://www.sendspace.com/file/l371kq


remember any release builds of modified source code must be distributed with the modified source code and GPL license(s) attached - read GPL license "TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION" no.3. http://www.gnu.org/copyleft/gpl.html#TOC3
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 20th June 2025 - 04:32 AM