spawn... replication... stuff

This is the place to go if you need help with creating your Mod/Mutator.

Moderator: Forum Moderators

Post Reply
User avatar
TurkeyFromHell
Staff Sergeant
Staff Sergeant
Posts: 640
Joined: Tue Jan 23, 2007 12:22 pm
Contact:

spawn... replication... stuff

Post by TurkeyFromHell » Mon Feb 26, 2007 9:30 pm

i seem to post a lot here lately..... i've got my mut down so it works... just... it doesnt spawn in network games x.x. i think it might be in checkreplacement, but i have no idea iv been looking at this screen for hours and im pissed off.



(question mark)

Quester115
Staff Sergeant
Staff Sergeant
Posts: 547
Joined: Wed May 03, 2006 8:10 pm
Location: at the Uni
Contact:

Post by Quester115 » Thu Apr 12, 2007 1:40 pm

was wondering if you ever found a fix with this problem...since i'm having the same trouble now. using checkreplacement() to switch out the flak cannon and replace with my energy cannon...works fine for local games (instant action ect) ... just not over net even when mutator is manually installed
Image
[seeking truth in life, no matter how painful it can be]

Quester115
Staff Sergeant
Staff Sergeant
Posts: 547
Joined: Wed May 03, 2006 8:10 pm
Location: at the Uni
Contact:

Post by Quester115 » Fri Apr 13, 2007 4:44 pm

ok not sure if this is the 'correct' way of fixing this problem but it seemed to work for now.
while using CheckReplacement() I declared it as a simulated function so that it would also be processed client side.
This seemed to make weapons ammo etc all appear as they should on the clients machine :)

Code: Select all

simulated function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
{
	local int i;
	local WeaponLocker L;

	bSuperRelevant = 0;

    if ( xWeaponBase(Other) != None )
    {
      if (XWeaponBase(Other).WeaponType == Class'XWeapons.FlakCannon')
      {
          XWeaponbase(Other).WeaponType = Class'MutEnergyFlac085.EnergyFlac';
          return false;
      }
    }
    else if (FlakAmmoPickup(Other) != None)
    {
      ReplaceWith(Other, "MutEnergyFlac085.EnergyFlacAmmoPickup");
      return false;
    }
    else if ( WeaponLocker(Other) != None )
    {
      L = WeaponLocker(Other);
      for (i = 0; i < L.Weapons.Length; i++)
      {
         if ( string( L.Weapons[i].WeaponClass ) ~= "XWeapons.FlakCannon" )
         {
            L.Weapons[i].WeaponClass = Class'MutEnergyFlac085.EnergyFlac';
         }
      }
      return true;
    }
    return true;
}
Image
[seeking truth in life, no matter how painful it can be]

Post Reply

Return to “Mod/Mutator Development”