Dispersion Pistol on a map query
- EvilGrins
- Godlike
- Posts: 9695
- Joined: Thu Jun 30, 2011 8:12 pm
- Personal rank: God of Fudge
- Location: Palo Alto, CA
- Contact:
Dispersion Pistol on a map query
Everytime I edit a Dispersion Pistol onto a map, when I go into play it for some reasons it turns into an Impact Hammer.
How do I get it not to change?
How do I get it not to change?
http://unreal-games.livejournal.com/
Smilies · viewtopic.php?f=8&t=13758medor wrote:Replace Skaarj with EvilGrins
Re: Dispersion Pistol on a map query
See DMMutator.uc, function CheckReplacement():Everytime I edit a Dispersion Pistol onto a map, when I go into play it for some reasons it turns into an Impact Hammer.
Code: Select all
...
// replace Unreal I inventory actors by their Unreal Tournament equivalents
...
if ( Other.IsA('DispersionPistol') )
{
ReplaceWith( Other, "Botpack.ImpactHammer");
return false;
}
Use another Mutator instead of Deathmatch.How do I get it not to change?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
- EvilGrins
- Godlike
- Posts: 9695
- Joined: Thu Jun 30, 2011 8:12 pm
- Personal rank: God of Fudge
- Location: Palo Alto, CA
- Contact:
Re: Dispersion Pistol on a map query
Deathmatch is a gametype, not a mutator... and the edit I'm doing this for is CTF.Barbie wrote:Use another Mutator instead of Deathmatch.
http://unreal-games.livejournal.com/
Smilies · viewtopic.php?f=8&t=13758medor wrote:Replace Skaarj with EvilGrins
-
- Adept
- Posts: 426
- Joined: Tue Feb 21, 2012 7:29 pm
Re: Dispersion Pistol on a map query
CTFGame extends TeamGamePlus which extends DeathMatchPlus.EvilGrins wrote:Deathmatch is a gametype, not a mutator... and the edit I'm doing this for is CTF.Barbie wrote:Use another Mutator instead of Deathmatch.
DeathMatch's MutatorClass=class'Botpack.DMMutator' by default.
DeathMatch's DefaultWeapon=class'Botpack.ImpactHammer' which is why you get the ImpactHammer in place of the DispersionPistol.
I think what you really need to do is include a mutator with this map edit that replaces the default weapon(ImpactHammmer)with the DispersionPistol.
- PrinceOfFunky
- Godlike
- Posts: 1200
- Joined: Mon Aug 31, 2015 10:31 pm
Re: Dispersion Pistol on a map query
Or maybe he can change DefaultWeapon property in the .ini?SC]-[WARTZ_{HoF} wrote:CTFGame extends TeamGamePlus which extends DeathMatchPlus.EvilGrins wrote:Deathmatch is a gametype, not a mutator... and the edit I'm doing this for is CTF.Barbie wrote:Use another Mutator instead of Deathmatch.
DeathMatch's MutatorClass=class'Botpack.DMMutator' by default.
DeathMatch's DefaultWeapon=class'Botpack.ImpactHammer' which is why you get the ImpactHammer in place of the DispersionPistol.
I think what you really need to do is include a mutator with this map edit that replaces the default weapon(ImpactHammmer)with the DispersionPistol.
"Your stuff is known to be buggy and unfinished/not properly tested"
- papercoffee
- Godlike
- Posts: 10447
- Joined: Wed Jul 15, 2009 11:36 am
- Personal rank: coffee addicted !!!
- Location: Cologne, the city with the big cathedral.
- Contact:
Re: Dispersion Pistol on a map query
I see a massive mismatch coming.PrinceOfFunky wrote:Or maybe he can change DefaultWeapon property in the .ini?SC]-[WARTZ_{HoF} wrote:CTFGame extends TeamGamePlus which extends DeathMatchPlus.EvilGrins wrote:Deathmatch is a gametype, not a mutator... and the edit I'm doing this for is CTF.Barbie wrote:Use another Mutator instead of Deathmatch.
DeathMatch's MutatorClass=class'Botpack.DMMutator' by default.
DeathMatch's DefaultWeapon=class'Botpack.ImpactHammer' which is why you get the ImpactHammer in place of the DispersionPistol.
I think what you really need to do is include a mutator with this map edit that replaces the default weapon(ImpactHammmer)with the DispersionPistol.
-
- Adept
- Posts: 426
- Joined: Tue Feb 21, 2012 7:29 pm
Re: Dispersion Pistol on a map query
What actually happens is if another weapon replacement mutator is used with a map with a weapon with altered default properties you'd get that weapon and the mutator replacement weapon in the same exact spot. It's never a good idea to add a weapon pickup and alter the weapon's default properties within a map.papercoffee wrote:I see a massive mismatch coming.PrinceOfFunky wrote:Or maybe he can change DefaultWeapon property in the .ini?SC]-[WARTZ_{HoF} wrote:CTFGame extends TeamGamePlus which extends DeathMatchPlus.EvilGrins wrote:Deathmatch is a gametype, not a mutator... and the edit I'm doing this for is CTF.Barbie wrote:Use another Mutator instead of Deathmatch.
DeathMatch's MutatorClass=class'Botpack.DMMutator' by default.
DeathMatch's DefaultWeapon=class'Botpack.ImpactHammer' which is why you get the ImpactHammer in place of the DispersionPistol.
I think what you really need to do is include a mutator with this map edit that replaces the default weapon(ImpactHammmer)with the DispersionPistol.
Re: Dispersion Pistol on a map query
3 things you need to do:
1: Subclass TournamentWeapon with a class called DPistol.
-Copy and paste all code and properties for the DispersionPistol into DPistol.
-This is to prevent DMMutator from removing it from game.
-You may want to add better bot AI while your at it.
2: Subclass Mutator with a class called MutDPistol.
-Add this Code:
-Note the classes are hard coded and not variables so they can be accessed at PreBeginPlay().
3: Subclass Actor with a class of any name.
-Add this code:
-Add this class anywhere in your level and at runtime it will add the mutator to the game.
EDIT:
Class 3 May require some Authority NetCode to use online, that however is beyond my ability to code.
EDIT2:
Instead of making DPistol I would recomend using OLWeapons.OLDPistol (included with Oldskool) as it already has proper bot support.
1: Subclass TournamentWeapon with a class called DPistol.
-Copy and paste all code and properties for the DispersionPistol into DPistol.
-This is to prevent DMMutator from removing it from game.
-You may want to add better bot AI while your at it.
2: Subclass Mutator with a class called MutDPistol.
-Add this Code:
Code: Select all
class MutDPistol expands Mutator;
function PreBeginPlay()
{
DefaultWeapon = Class'DPistol'; //Make DefaultWeapon a DPistol.
}
function bool AlwaysKeep(Actor Other)
{
if ( Other.IsA('DPistol') ) //Don't remove DPistols from level.
return true;
if ( NextMutator != None )
return ( NextMutator.AlwaysKeep(Other) );
return false;
}
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if ( Other.IsA('ImpactHammer') ) //Swap ImpactHammers with DPistols.
{
ReplaceWith(Other, "MyLevel.DPistol"); //Note if you don't use MyLevel then change to the Package the one you use.
return false;
}
bSuperRelevant = 0;
return true;
}
3: Subclass Actor with a class of any name.
-Add this code:
Code: Select all
class MyActor expands Actor; //Whatever name you choose.
function PostBeginPlay()
{
Level.Game.BaseMutator.AddMutator(Spawn(class'MyLevel.MutDPistol')); //Again change MyLevel to whatever package you use.
}
EDIT:
Class 3 May require some Authority NetCode to use online, that however is beyond my ability to code.
EDIT2:
Instead of making DPistol I would recomend using OLWeapons.OLDPistol (included with Oldskool) as it already has proper bot support.
Signature goes here.
- EvilGrins
- Godlike
- Posts: 9695
- Joined: Thu Jun 30, 2011 8:12 pm
- Personal rank: God of Fudge
- Location: Palo Alto, CA
- Contact:
Re: Dispersion Pistol on a map query
Hmmmm... maybe I'll just stick with the Oldskool default weapon selection I normally use, then.
http://unreal-games.livejournal.com/
Smilies · viewtopic.php?f=8&t=13758medor wrote:Replace Skaarj with EvilGrins
-
- Inhuman
- Posts: 958
- Joined: Wed Mar 31, 2010 9:02 pm
- Personal rank: I am quite rank.
- Location: MrLoathsome fell out of the world!
Re: Dispersion Pistol on a map query
If you run that UT2U1 mutator I did, you could have Dispersion Pistols and Impact Hammers on the
map at the same time I believe.
map at the same time I believe.
blarg
- sektor2111
- Godlike
- Posts: 6410
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Re: Dispersion Pistol on a map query
You can setup another brother of Dispersion which is NOT in account by default DMMutator used in every game from Botpack (yeah geniuses telling me to not have other game-types). Other game-type might allow presence of any STUFF from any map with no replacements and everything running in original. Else a new weapon aka New Dispersion WILL NEVER FIRE in VANILLA original server ON-LINE without writing and changing a few lines and adding 2 missing states (like I did to some weapon Saber stupid useless thing), and then you might have a combination Weapon/TournamentWeapon with no issues ON LINE/OFF LINE for every UT Player from Planet Earth. Of course, this is a matter of writing codes not only painting walls in maps.