![]() |
|
|
#1 |
|
Registered User
Join Date: Apr. 22nd, 2012
Posts: 7
|
hi all my name is penpen86
it this day's i am in work to make my first mutator i found a tutorial of ambershee that explain how make thismy 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
{
}
Code:
[UTWeap_EnforcerPlusOne] ItemName="Enforcer+1" PickupMessage="Enforcer+1" 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 by penpen86; 24th Apr 2012 at 11:16 AM. |
|
|
|
|
|
#2 |
|
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");
UTWeap_Stinger(Other).Destroy();
}
return true;
}
Last edited by Pandemonium; 24th Apr 2012 at 02:00 PM. |
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Apr. 22nd, 2012
Posts: 7
|
WORKKKKKKKKKKKKK !!!!!!!!!!!!!!!!! pandemonium for president
![]() thanks a lot friend
|
|
|
|
|
|
#4 |
|
Keep it up!
![]() - |
|
|
|
|
|
|
#5 |
|
Registered User
Join Date: Apr. 22nd, 2012
Posts: 7
|
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
}
Last edited by penpen86; 24th Apr 2012 at 07:18 PM. |
|
|
|
|
|
#6 |
|
Your new weapon is a subclass of an existing weapon, right? So if you don't code something new or change anything in the defaultproperties nothing would be changed at all..
Type in only what you want to be new and omit anything else. - |
|
|
|
|
|
|
#7 |
|
Registered User
Join Date: Apr. 22nd, 2012
Posts: 7
|
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
{
}
Code:
class UTWeap_MutTheLast_inger extends UTWeap_Stinger;
DefaultProperties
{
InstantHitDamage(0)=1.000000
AmmoCount=200
}
Last edited by penpen86; 25th Apr 2012 at 04:56 PM. |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Apr. 22nd, 2012
Posts: 7
|
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 InstantHitDamage(0)=14.000000 InstantHitDamageTypes(0)=Class'UTGame.UTDmgType_StingerBullet' EquipTime=0.600000 FireOffset=(X=19.000000,Y=10.000000,Z=-10.000000) bInstantHit=True UTGame.UTDmgType_StingerBullet ........ 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
VehicleDamageScaling=0.600000 <--- maybe this?????
VehicleMomentumScaling=0.750000
Name="Default__UTDmgType_StingerBullet"
ObjectArchetype=UTDamageType'UTGame.Default__UTDamageType'
}
if i write on my UTWEAP_MutTheLast_inger Code:
class UTWeap_MutTheLast_inger extends UTWeap_Stinger;
DefaultProperties
{
InstantHitDamage(0)=1
AmmoCount=200
InstantHitDamageTypes(0)=Class'UTGame.UTDmgType_StingerBullet'
}
Last edited by penpen86; 25th Apr 2012 at 04:55 PM. |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Apr. 22nd, 2012
Posts: 7
|
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 don't work against vehicle if i put: Code:
InstantHitDamage(0)=2.000000 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 by penpen86; 25th Apr 2012 at 05:40 PM. |
|
|
|
|
|
#10 |
|
Registered User
Join Date: Apr. 22nd, 2012
Posts: 7
|
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();
}
if (Other.IsA('UTDmgType_StingerBullet') && !Other.IsA('UTDmgType_Stinger'))
{
ReplaceWith(Other, "UTDmgType_Stinger");
}
return true;
}
DefaultProperties
{
}
Code:
class UTWeap_MutTheLast_inger extends UTWeap_Stinger;
DefaultProperties
{
InstantHitDamage(0)=1.000000
AmmoCount=200
}
Code:
class UTDmgType_Stinger extends UTDmgType_StingerBullet;
defaultproperties
{
VehicleDamageScaling=100 <---- default is 0.600000
}
![]() please helppppp ![]() thx |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|