WITHIN THE PAWN CLASS // ================================++++++++===================================== // Custom input to call the shield upon button press and release. exec function Shield(int i) { local AA2Weap_Ajax Ajax; Ajax = AA2Weap_Ajax(Weapon); if(i==0) //just pressed { bShieldActive=true; bIsInvulnerable=true; Ajax.PlayAjaxAnimation("ArgoShield"); SetTimer(ShieldTime,true,'ShieldIdleLoop'); } if(i==1) //just released { bIsInvulnerable=false; bShieldActive=false; ClearTimer('ShieldIdleLoop'); Ajax.PlayAjaxAnimation("ShieldPutDown"); } } // This function loops the shield idle animation. function ShieldIdleLoop() { local AA2Weap_Ajax Ajax; Ajax = AA2Weap_Ajax(Weapon); ClearTimer('ShieldIdleLoop'); Ajax.PlayAjaxAnimation("ArgoShieldIdle"); } // ================================--------===================================== WITHIN THE WEAPON CLASS // ================================++++++++===================================== // GainedEnergy handles the switching of alt fires dynamically within Ajax. function GainedEnergy(class DamageType) { if(DamageType == class'AA2DmgType_Charged') { WeaponFireTypes[1]=WeaponFireTypes[2]; WeaponProjectiles[1]=WeaponProjectiles[2]; FireInterval[1]=FireInterval[2]; ShotCost[1]=ShotCost[2]; Spread[1]=Spread[2]; WeaponFireSnd[1]=WeaponFireSnd[2]; MuzzleFlashAltPSCTemplate=AjaxMuzzleFlashAltPSCT[2]; } if(DamageType == class'AA2DmgType_Flame') { WeaponFireTypes[1]=WeaponFireTypes[3]; WeaponProjectiles[1]=WeaponProjectiles[3]; FireInterval[1]=FireInterval[3]; ShotCost[1]=ShotCost[3]; Spread[1]=Spread[3]; WeaponFireSnd[1]=WeaponFireSnd[3]; MuzzleFlashAltPSCTemplate=AjaxMuzzleFlashAltPSCT[3]; } }