Wednesday, September 12, 2012

Arrival of the Beta Phase!

Hey everybody, I'm back to blogging and as you can tell from the title we are officially in the beta phase for this project before we reach our deadline. The team got together and set up a new statement of work so that each of us know what we are responsible for by the end of the beta phase.
Our first and foremost concern was to address the bugs that were compiled from our bug testing session. I guess I forgot to mention that we had a bug testing session after our alpha phase. But anyways, the bugs were are main concern. One of the bugs that I worked on was disabling the fire animation if the player is in a state where he should not be firing at all. This wasn't that tough and it mainly involved me implementing the reload animation which is also what I did. I created the animation and coded a reload function for our revolver with some help from the web on how to exactly go about coding it. You can see that code below. The issue at this point was making sure the player could not initiate the fire animation during the reload animation because that breaks the reload animation. This was not too difficult to resolve because I just needed to check a bool variable that checked if the weapon was currently reloading, and if that variable was true then the firing and its animation will not initiate unless that variable changed into being false.
Looking forward, I'm going to create some reload animations for the repeater rifle and the laser rifle. I also need to get the dynamite throw animations and possibly damage animations created so that they could be implemented coming up.

simulated function bool DoOverrideNextWeapon()
{
    if(clips == 0)
        super.DoOverrideNextWeapon();

    return false;
}

simulated function WeaponEmpty()
{
    local AFTU_Pawn P;

    foreach AllActors(class'AFTU_Pawn',P)
    {
        Player=P;
        break;
    }

    if(clips > 0 && !bIsReloading)
    {
        WorldInfo.Game.Broadcast(self, "Reloading");
        bIsReloading = true;
        SetTimer(2.5, false, 'Reload');
        Player.FullBodyAnimSlot.PlayCustomAnim('DW_Reload_Revolver', 0.5, 0.2, 0.2, false, true);
        return;
    }

    super.WeaponEmpty();
}

function Reload()
{
    bIsReloading = false;
    clips = clips - 1;
    AddAmmo(30);
    ClearTimer();
}

No comments:

Post a Comment