![]() |
![]() |
Salvax |
![]() ![]()
Post
#1
|
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 75 Joined: 14-February 07 Member No.: 1,034 ![]() |
___2007.04.30___
Fixed: BOTs don't always duck while attacking (this game is not counter-strike ![]() Added: Ladders can be used (need improvement) Randomly switch weapon while attacking (not only switch weapon while looping on waypoints) Randomly change firing speed Randomly fire @ wall while BOTs feel boring (no enemy in sight) a video about bot on ladder (not always working like this) File Name: Finally, BOTs USE Ladder_Salvax.wmv Size: 536KB Download Link: http://www.sendspace.com/file/tu8m04 latest .dll File Name: rcbot2_test_only_April30.rar Size: 320KB Download Link: http://www.sendspace.com/file/slk50z latest modified codes File Name: modified_rcbot2src_base_April30.rar Size: 107KB Download Link: http://www.sendspace.com/file/6jxv92 _________________________________________________________________________ the problem is how to let bot focus on one action , for example: in bot_waypoint.cpp CODE void CWaypointNavigator :: updatePosition () ... .. . m_pBot->speed(); m_pBot->Ladder(); m_pBot->Randomjump(); m_pBot->campwalk(); so if bot is running on a ladder, the bot also jumps even i set the jump action as a random action , then bot drops from the ladder. so it's with the campwalk action and sprint action, bot executes the 2 actions @ the same time even both are random actions , as i defined in bot.cpp : CODE void CBot :: campwalk () { float fHoldTimeCamp = RandomFloat(0.5,0.8); if ( RandomInt(300,400) > 389 && m_pButtons->canPressButton(IN_SPEED) && m_pButtons->canPressButton(IN_DUCK) && !m_pButtons->holdingButton(IN_SPEED) ) m_pButtons->holdButton(IN_DUCK,0.1/* time to press*/,fHoldTimeCamp/* hold time*/,0/*let go time*/); } void CBot :: speed () { float fHoldTimeSprint = RandomFloat(0.3,0.5); if ( RandomInt(1,10) < 5 && m_pButtons->canPressButton(IN_SPEED) && m_pButtons->canPressButton(IN_DUCK) && !m_pButtons->holdingButton(IN_DUCK) ) m_pButtons->holdButton(IN_SPEED,0/* time to press*/,fHoldTimeSprint/* hold time*/,0/*let go time*/); } it seems ( ! m_pButtons->holdingButton(IN_?????) ) is not working ? Thx Captain, and long to see ur reply ! |
![]() ![]() |
Salvax |
![]()
Post
#2
|
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 75 Joined: 14-February 07 Member No.: 1,034 ![]() |
BotTask in bot_task.cpp, yeah, i got that . but it seems that the code only works while bot is attacking ,and updatePosition function in bot_waypoint.cpp is another status of BOT action while looping on waypoint. so if i wanna add some actions into the status of BOT looping , where should i put the codes ?
By the way, what value is the ideal speed of sprint ? I see it is already defined as m_fIdealMoveSpeed = 320 in bot.cpp still have no idea where to add sprint code in void CBot :: doMove () in bot.cpp CODE ... .. . m_fForwardSpeed = m_fIdealMoveSpeed * flMove; ... .. . so, do i need to set m_fIdealMoveSpeed as a Random value that it can be switched into run\walk\sprint speed ? |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 21st August 2025 - 01:21 PM |