UE3 - UT3 ut3 mutator help

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

penpen86

New Member
Apr 22, 2012
7
0
0
hi all my name is penpen86

it this day's i am in work to make my first mutator :D i found a tutorial of ambershee that explain how make this

my mutator in simple: change the stinger with one new stinger but i have a problem... i follow the tutorial step by step ad all work fine ;)
but there is a problem that is not in; the new stinger work but in game i have 2 stinger!!! and i don't know how to remove the old one. someone can help me??

here my .uc

Code:
class MutTheLast_inger extends UTMutator;

function InitMutator(string Options,out string ErrorMessage)
{
if (UTGame(WorldInfo.Game) != None)
{
UTGame(WorldInfo.Game).DefaultInventory[0] = class'UTWeap_MutTheLast_inger';
}

Super.InitMutator(Options,ErrorMessage);
}

function bool CheckReplacement(Actor Other)
{
if (Other.IsA('UTWeap_Stinger') && !Other.IsA('UTWeap_MutTheLast_inger'))
{
ReplaceWith(Other, "UTWeap_MutTheLast_inger");
}

return true;
}

DefaultProperties
{
}

ps. i don't change the name the stinger like to this:

Code:
[UTWeap_EnforcerPlusOne]
ItemName="Enforcer+1"
PickupMessage="Enforcer+1"

becouse i don't want a new name of my stinger, could be a problem??

EDIT: i have this problem becouse i have already the stinger in my "weapon base" this code replace the enforcer or hammer with "DefaultInventory" becouse These two unique weapons can be replaced as the default weapons. i need an help for replace the original stinger when the mutator is activate

thx all for attention
penpen
 
Last edited:
Hi,

I had trouble while creating a mutator for ut2k4. I used the ReplaceWith()-function for replacing the weaponbases with a new, self created one. At first I had two weaponbases in one place, too.

I had to delete the old weaponbase by adding "Actor(Other).Destroy;" to the CheckReplacement-function.

So maybe something like this helps you:


Code:
function bool CheckReplacement(Actor Other)
{
if (Other.IsA('UTWeap_Stinger') && !Other.IsA('UTWeap_MutTheLast_inger'))
{
ReplaceWith(Other, "UTWeap_MutTheLast_inger");
[COLOR="Red"]UTWeap_Stinger(Other).Destroy();[/COLOR]
}
return true;
}

-
 
Last edited:

penpen86

New Member
Apr 22, 2012
7
0
0
ok 2nd problem lol
now the stinger work perfectly but don't make any damage at vehicle :/
any idea how to make it???

i think now the issues, is to add in UTWeap_MutTheLast_inger the correct variable

Code:
class UTWeap_MutTheLast_inger extends UTWeap_Stinger;

DefaultProperties
{
InstantHitDamage(0)=1.000000
AmmoCount=200
}

wrong way?? :/
 
Last edited:

penpen86

New Member
Apr 22, 2012
7
0
0
yes is correct is a subclass... but i change only InstantHitDamage and
AmmoCount... i don't know why the damage work only against players and not versus vehicule!!!

my actually MutTheLast_inger.uc

Code:
class MutTheLast_inger extends UTMutator;

function InitMutator(string Options,out string ErrorMessage)
{
if (UTGame(WorldInfo.Game) != None)
{
UTGame(WorldInfo.Game).DefaultInventory[6] = class'UTWeap_MutTheLast_inger';
}

Super.InitMutator(Options,ErrorMessage);
}

function bool CheckReplacement(Actor Other)
{
if (Other.IsA('UTWeap_Stinger') && !Other.IsA('UTWeap_MutTheLast_inger'))
{
ReplaceWith(Other, "UTWeap_MutTheLast_inger");
UTWeap_Stinger(Other).Destroy();
}

return true;
}

DefaultProperties
{
}

and UTWEAP_MutTheLast_inger.uc

Code:
class UTWeap_MutTheLast_inger extends UTWeap_Stinger;

DefaultProperties
{
InstantHitDamage(0)=1.000000
AmmoCount=200
}

now i think the problem is not in utweap, i read the original suorce code of stinger(UTGame.UTWeap_Stinger) that i found in internet,and there is nothing about "damage of vehicle" or something about that,but i may be wrong :S
 
Last edited:

penpen86

New Member
Apr 22, 2012
7
0
0
one news, i found in internet this:

in original source code of UTGame.UTWeap_Stinger
it s just a piece of code
Code:
.........
FireInterval(0)=0.100000
   FireInterval(1)=0.280000
   Spread(0)=0.067500
   [COLOR="Red"]InstantHitDamage(0)=14.000000
   InstantHitDamageTypes(0)=Class'UTGame.UTDmgType_StingerBullet'[/COLOR]
   EquipTime=0.600000
   FireOffset=(X=19.000000,Y=10.000000,Z=-10.000000)
   bInstantHit=True
UTGame.UTDmgType_StingerBullet
........

InstantHitDamageTypes goes to call the othersource code

UTGame.UTDmgType_StingerBullet
Code:
class UTDmgType_StingerBullet extends UTDamageType
    abstract;

defaultproperties
{
   bBulletHit=True
   DamageWeaponClass=Class'UTGame.UTWeap_Stinger'
   DeathAnim="Death_Stinger"
   DeathAnimRate=0.900000
   StopAnimAfterDamageInterval=0.500000
   NodeDamageScaling=0.600000
   KillStatsName="KILLS_STINGER"
   DeathStatsName="DEATHS_STINGER"
   SuicideStatsName="SUICIDES_STINGER"
   RewardCount=15
   RewardAnnouncementSwitch=9
   RewardEvent="REWARD_BLUESTREAK"
   CustomTauntIndex=8
   DeathString="`o was mowed down by `k's Stinger."
   FemaleSuicide="`o turned the Stinger on herself."
   MaleSuicide="`o turned the Stinger on himself."
   bNeverGibs=True
   bCausesBloodSplatterDecals=True
   KDamageImpulse=200.000000
   [COLOR="Red"]VehicleDamageScaling=0.600000[/COLOR]     <--- maybe this?????
   VehicleMomentumScaling=0.750000
   Name="Default__UTDmgType_StingerBullet"
   ObjectArchetype=UTDamageType'UTGame.Default__UTDamageType'
}

maybe is possible to connected in some way to my mutator???

if i write on my UTWEAP_MutTheLast_inger
Code:
class UTWeap_MutTheLast_inger extends UTWeap_Stinger;

DefaultProperties
{
InstantHitDamage(0)=1
AmmoCount=200
[COLOR="Red"]InstantHitDamageTypes(0)=Class'UTGame.UTDmgType_StingerBullet'[/COLOR]
}

in theory woul be connect but don't work!!!!! :(
 
Last edited:

penpen86

New Member
Apr 22, 2012
7
0
0
ok i found a problem!!!! lol

but need help.... :/ i did this mutator for stop stinger abusing(more players in my server vctf complain about it becouse more players abuse of that weapon) but i don't wan't to remove becouse the only way to stop raptor/manta taxi. then i decided to reducer the damage of stinger at minimal enough to fall down the flag carrier on overboard.

this is the problem, if i put
Code:
InstantHitDamage(0)=1.000000
(default is 14.000000)
don't work against vehicle

if i put:
Code:
InstantHitDamage(0)=2.000000
i have a little damage of vehicle :) and and grows exponentially if i put 3.00000/4.00000/5.00000 ex. ex.

but i want to leave at minimal 1.00000 ; then my question,is possible to separate the two thing??? i want the default damage of stinger against vehicle(14.000000) and the damage against players on 1.000000

is possible???
 
Last edited:

penpen86

New Member
Apr 22, 2012
7
0
0
last news:

i try to connect the other UTDmgType_StingerBullet

then now i make:
MutTheLast_inger.uc
Code:
class MutTheLast_inger extends UTMutator;

function InitMutator(string Options,out string ErrorMessage)
{
	if (UTGame(WorldInfo.Game) != None)
	{
		UTGame(WorldInfo.Game).DefaultInventory[6] = class'UTWeap_MutTheLast_inger';
	}
	Super.InitMutator(Options,ErrorMessage);
}

function bool CheckReplacement(Actor Other)
{
	if (Other.IsA('UTWeap_Stinger') && !Other.IsA('UTWeap_MutTheLast_inger'))
	{
		ReplaceWith(Other, "UTWeap_MutTheLast_inger");
		UTWeap_Stinger(Other).Destroy();
	}
	[COLOR="Red"]if (Other.IsA('UTDmgType_StingerBullet') && !Other.IsA('UTDmgType_Stinger'))
	{
		ReplaceWith(Other, "UTDmgType_Stinger");[/COLOR]
	}

	return true;
}

DefaultProperties
{
}

UTWEAP_MutTheLast_inger.uc
Code:
class UTWeap_MutTheLast_inger extends UTWeap_Stinger;

DefaultProperties
{
InstantHitDamage(0)=1.000000
AmmoCount=200
}

UTDmgType_Stinger.uc
Code:
[COLOR="Red"]class UTDmgType_Stinger extends UTDmgType_StingerBullet;
	
defaultproperties
{
VehicleDamageScaling=100     <---- default is 0.600000
}[/COLOR]

i try to connect the UTDmgType_StingerBullet with parameter of VehicleDamageScaling modified to mutator... is correct the code??? ut3 compiler don't show any error when compiling the mut but in game nothing happend, don't work the damage at vehicule:(

please helppppp :(

thx