ForEach?

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

ForEach?

Postby Cozmo » Mon Dec 03, 07 7:53 pm

Hi. I've been making a NanoKeyRing for multiplayer and the only problem seems to be the actual key for it. Compiles ok, but doesn't 'pick it up'.
I think it's to do with ForEach, because I haven't used it before I might've done something wrong. Could someone please point out what I've done wrong? Thanks.

Code: Select all
auto state Pickup
{
   function Frob (Actor Frobber, Inventory frobWith)
   {
   local NanoMPKeyRing MPKeyR;

      foreach AllActors(class'NanoMPKeyring', MPKeyR)
      {
         if(MPKeyR.Owner == DeusExPlayer(Frobber))
         {
            if(bNoRespawn == True)
            {
               MPKeyR.KeysID[AddKeyID] = 1;
               DeusExPlayer(Frobber).ClientMessage(AddKeyMessage);
               Destroy();
            }

            if(bRespawned == True)
            {
               MPKeyR.KeysID[AddKeyID] = 1;
               DeusExPlayer(Frobber).ClientMessage(AddKeyMessage);
               MultiSkins[0] = Texture'PinkMaskTex';
               MultiSkins[1] = Texture'PinkMaskTex';
               MultiSkins[2] = Texture'PinkMaskTex';
               bRespawned = False;
               SetTimer(1.0, true);
            }
         }
      }
   }
}
Last edited by Cozmo on Mon Dec 03, 07 7:54 pm, edited 1 time in total.
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Return to Editing issues

Who is online

Users browsing this forum: No registered users and 4 guests
cron