![](smile.gif)
Yeah, its favourite things are: jam, corners and trees . In that order.
[edited by - JuNC on August 8, 2003 5:39:03 PM]
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
quote: Original post by Jason2Jason
Heres the source to my ''DumbBot''. I was just muking around, so it won''t be entered!
void DumbBot::Update(){ //Update cycle entry point. Your AI code goes here. g_pCore->TurnRight(TURN_SLOW); g_pCore->SetSpeed(SET_NORMAL_SPEED); if(g_pCore->GetMyHealth() < LastHealth) { g_pCore->Taunt("Ouch!"); LastHealth = g_pCore->GetMyHealth(); } if(g_pCore->GetMyAmmoCount() <= 0) { g_pCore->SelectWeapon(WEAPON_COCKTAIL); g_pCore->SetWeaponAngle(90.0f); } else { g_pCore->SelectWeapon(WEAPON_GUN); } g_pCore->Fire();}
Unfortunatly the taunt doesn''t work, but heh.
EDIT: fixed the ouch problem in the code, needed to initialise LastHealth to 100 in the init function "LastHealth = 100;"
-J
[edited by - jason2jason on August 5, 2003 9:57:14 AM]