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]