![]() |
![]() |
Salvax |
![]() ![]()
Post
#1
|
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 75 Joined: 14-February 07 Member No.: 1,034 ![]() |
___feb 25th 2007___
added: bot can randomly switch weapon (weapon picked up, pistol, grenade and SMG. and Be SURE in bot profile, weapon = default ). improved: bot can sprint randomly (not ONLY attacking or under attack). _____OLD LOG ______ added: bot can sprint. added: bot can have secondary attack mode (SMG Grenade, AR2 Ball, Shotgun, S.L.A.M, Grenade). You can download the latest modified source code and test only [HPB_bot2.dll] here: rcbot2_test_only_feb25.rar (test map included, load test map:salvax, and tpye exec rcbot2 in console.) http://www.sendspace.com/file/tyxlae modified_rcbot2src_base_feb25.rar http://www.sendspace.com/file/vodflz You can also search "salvax" to check the modified source code. Thank You Again, Captain Cheeseh !!! ******************************************************************************** ******** PLZ test it, Captain ! (U can downlaod below ,ALL latest modified source and DLL uploaded) After the secondary attack code, i added some new codes of AUX Power for bot,(of cause my new code is based on bot button again, this time i think it 's not as good as i thought, because bot only use AUX power to rush when he wants to kill an enemy or he is under attack. I think let bot rushing is a random thing, so i need time to try if i can change the bot button thing to random bot action. Now i bring u a small problem: i think these code below make bot stand and jump on one point to shoot his enemy, would u plz adjust the time value so the bot can be standing there for a short time. then bot can take more time to use AUX power to rush and flank. (i tried a whole day to adjust the time value, but in vain) bot.cpp QUOTE void CBot :: jump () { if ( m_pButtons->canPressButton(IN_JUMP) ) { m_pButtons->holdButton(IN_JUMP,0/* time to press*/,0.5/* hold time*/,0.5/*let go time*/); // do the trademark jump & duck m_pButtons->holdButton(IN_DUCK,0.2/* time to press*/,0.3/* hold time*/,0.5/*let go time*/); } } void CBot :: duck ( bool hold ) { if ( hold || m_pButtons->canPressButton(IN_DUCK) ) m_pButtons->holdButton(IN_DUCK,0.0/* time to press*/,1.0/* hold time*/,0.5/*let go time*/); } ____________________________________________ Great many thx to Captain Cheeseh!!! rcbot2_for_test_only_feb22.rar (*You can test secondary attack mode and AUX Power in the test MAP:salvax*) http://www.sendspace.com/file/ufsh77 rcbot2_modified_source.rar (*You can search string "salvax" to see the added codes.*) http://www.sendspace.com/file/a5uhn0 |
![]() ![]() |
Salvax |
![]()
Post
#2
|
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 75 Joined: 14-February 07 Member No.: 1,034 ![]() |
THX, hmmm if i don't like the bot to stop, can i change the highlighted code below stopMoving(); to: findEnemy(); ?
bot.cpp QUOTE if ( m_pNavigator->hasNextPoint() ) { m_pNavigator->updatePosition(); } else stopMoving(); PS: but how can i make bots to rush with AUX Power without the bot button thing ? these speed codes? : bot.cpp QUOTE cmd.forwardmove = m_fForwardSpeed; cmd.sidemove = m_fSideSpeed; cmd.upmove = m_fUpSpeed; |
Cheeseh |
![]()
Post
#3
|
![]() Admin ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 ![]() |
no doing that removes the essence of game programming
![]() findEnemy only updates the bots m_pEnemy it doesn't instantly make a bot run around for an enemy and shoot them, no its much more complex and requires several stages (as everything is split into tasks, these tasks get read every frame and do not complete until several frames or seconds have passed). if you want them to use the AUX power Sprint, they need to press the sprint button, doing so any other way is considered a 'hack' |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 21st August 2025 - 09:19 PM |