Saturday, 23 February 2013

Cargo Crash

A game developed by a team of 5 for our second year Game Development module. Carg0 crash is a third person jumping puzzle game, that requires the player to change suits and abilities using a RFID card reader. My main role was programming and implementing the main functionality into the game using Kismet and unreal script. I also took part in the design and basic outline build of level one.
 
One of the main mechanic of carg0 crash was the use of an RFID reader that change the players abilities/looks with cards that are place on the card reader.
 
//Checks to see if there is a change in the card reader, If so then the Kismet Seq_Event_RFID event will be triggered.
function Timer()
{
     local int i;
     local Sequence GameSeq;
     local array<SequenceObject> AllSeqEvents;

     GameSeq = WorldInfo.GetGameSequence();
     newTag = rfid_GetTag();
     if(newTag != oldTag)
     {
          if(GameSeq != None)
         {
               GameSeq.FindSeqObjectsByClass(class'Seq_Event_RFID',
               true, AllSeqEvents); //Finds the Seq_Event_RFID in side the level
               for(i=0; i<AllSeqEvents.Length; i++)
              {
                   Seq_Event_RFID(AllSeqEvents[i]).CheckActivate(WorldInfo, None);
                  //Send the Tage number to the Seq_Event_RFID in side the level
                  oldTag = newTag;
              }
          }
     }
}

//Changes the overlay mesh of carg0
exec function SetMesh(SkeletalMesh newMesh,int overlayMesh)
//Applys the suit overlay to the player mesh
{
     if(overlayMesh == 0) //Adds the selected overlays
     {
          CargoOverLay.SetSkeletalMesh(newMesh);
          CargoOverLay.SetParentAnimComponent(Mesh);
          self.AttachComponent(CargoOverLay);
     }
     if(overlayMesh == 1) //Removes the overlays
     {
          CargoOverLay.SetParentAnimComponent(Mesh);
          self.DetachComponent(CargoOverLay);
     }
}

 
 

No comments:

Post a Comment