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

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: 18th June 2025 - 06:35 PM