Normal WaW perks are not done through the hud.menu but are hud-elements created in _zombiemode_perks. You have to edit them there.
perk_hud_create( perk ) { if ( !IsDefined( self.perk_hud ) ) { self.perk_hud = []; } /# if ( GetDVarInt( "zombie_cheat" ) >= 5 ) { if ( IsDefined( self.perk_hud[ perk ] ) ) { return; } } #/ shader = ""; switch( perk ) { case "specialty_armorvest": shader = "specialty_juggernaut_zombies"; break; case "specialty_quickrevive": shader = "specialty_quickrevive_zombies"; break; case "specialty_fastreload": shader = "specialty_fastreload_zombies"; break; case "specialty_rof": shader = "specialty_doubletap_zombies"; break; default: shader = ""; break; } hud = create_simple_hud( self ); hud.foreground = true; hud.sort = 1; hud.hidewheninmenu = false; hud.alignX = "left"; hud.alignY = "bottom"; hud.horzAlign = "left"; hud.vertAlign = "bottom"; hud.x = self.perk_hud.size * 30; hud.y = hud.y - 70; hud.alpha = 1; hud SetShader( shader, 24, 24 ); self.perk_hud[ perk ] = hud; }
You could use:
hud.horzAlign = "center";
But you also need to adjust it here, if you want it to stay nice and centered:
hud.x = self.perk_hud.size * 30;
In _zombiemode_score you can find an example of how to make moving hud-elements:
// Move the hud hud MoveOverTime( time ); hud.x -= 20 + RandomInt( 40 ); hud.y -= ( -15 + RandomInt( 30 ) ); wait( half_time ); // Fade half-way through the move hud FadeOverTime( half_time ); hud.alpha = 0; wait( half_time );