![]() |
![]() |
|
#1
|
|||
|
|||
|
Well i just started my first Mutator, and got it working in itself just fine, but now the Mutator has one Problem, when the Mutator is active you can no longer switch Weapons. Even if the changed Weapon is dropped it is not possible.
Code:
class MutWitzigsWeapon extends Mutator;
//=============================================================================
function BeginPlay()
{
local RORoleInfo RORole;
local int j;
super.BeginPlay();
foreach AllActors(class'RORoleInfo',RORole)
{
if(RORole != None)
{
for(j = 0;j < 3; j++)
{
if(RORole.PrimaryWeapons[j].Item == class'ROInventory.PPD40Weapon')
RORole.PrimaryWeapons[j].Item = class'MutWitzigsWeapon.PPD40WWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.G43Weapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.G43WWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.G43ScopedWeapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.G43WScopedWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.DP28Weapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.DP28WWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.Kar98ScopedWeapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.Kar98WScopedWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.MN9130ScopedWeapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.MN9130WScopedWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.MP40Weapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.MP40WWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.MP41Weapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.MP41WWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.PPS43Weapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.PPS43WWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.PPSH41Weapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.PPSH41WWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.STG44Weapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.STG44WWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.SVT40Weapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.SVT40WWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.SVT40ScopedWeapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.SVT40WScopedWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.MG34Weapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.MG34WWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.MG42Weapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.MG42WWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.SatchelCharge10lb10sWeapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.SatchelCharge10lb10sWWeapon';
if(RORole.PrimaryWeapons[j].Item==class'ROInventory.PanzerFaustWeapon')
RORole.PrimaryWeapons[j].Item=class'MutWitzigsWeapon.PanzerFaustWWeapon';
}
}
}
}
defaultproperties
{
GroupName="Weapon Mut"
FriendlyName="WeaponMut"
Description="blah blah"
}
In an earlier Version i made the Error that dropped Version would be the Standard RO Weapons, after the modded Weapon was dropped Weapon switching worked again. Or if someone could point me to the Class controlling Weapon switching i might find the Error myself.
__________________
Steam-Name: Tank-Boy-Ken |
|
#2
|
|||
|
|||
|
Post some code from one of the weapons you modded then we can see what you are trying to do.
|
|
#3
|
||||
|
||||
|
tbh. i think its the RoleInfo actor and the way it is replicated. Just an assumption though.
|
|
#4
|
|||
|
|||
|
MG34WWeapon
Code:
class MG34WWeapon extends MG34Weapon;
#exec OBJ LOAD FILE=..\Animations\Axis_Mg34_1st.ukx
defaultproperties
{
FireModeClass(0)=MG34WAutoFire
FireModeClass(1)=MG34WSemiAutoFire
//** Inventory/Ammo **//
PickupClass=class'MG34WPickup'
}
Code:
class MG34WPickup extends MG34Pickup
notplaceable;
defaultproperties
{
InventoryType=class'MG34WWeapon'
}
Code:
defaultproperties
{
//** Projectile Firing Modded **//
Spread = 75
//** Recoil **//
maxVerticalRecoilAngle=650
maxHorizontalRecoilAngle=450
//** View shake **//
ShakeOffsetTime=1.0
ShakeRotTime=0.5
//** Recoil modifiers **//
RecoilRate=0.04
PctHipMGPenalty=1.1
}
Code:
defaultproperties
{
//** Projectile Firing Modded **//
Spread = 75
//** Recoil **//
maxVerticalRecoilAngle=350
maxHorizontalRecoilAngle=250
//** View shake **//
ShakeOffsetTime=1.0
ShakeRotTime=0.5
//** Recoil modifiers **//
RecoilRate=0.06
PctHipMGPenalty=1.3
}
Its like this: Code:
function string GetInventoryClassOverride(string InventoryClassName)
{
if(InventoryClassName=="ROInventory.MG34Weapon")
return "MutWitzigsWeapon.MG34WWeapon";
all other Weapons....
}
__________________
Steam-Name: Tank-Boy-Ken |
|
#5
|
||||
|
||||
|
Worluk is correct. I had this exact same problem.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|