Announcement

Collapse
No announcement yet.

What's wrong with this mut?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What's wrong with this mut?

    I'm having problems with my Duel Remove mutator.

    It simply does not remove any of the things I try.

    My first one was this:

    Code:
    class UTMutator_DuelRemove extends UTMutator;
    
    function bool CheckReplacement(Actor Other)
    {
    	local UTPickupFactory F;
    
    	F = UTPickupFactory(Other);
    	return ( F == None || (!F.IsA('UTPickupFactory_UDamage') && !F.IsA('UTPickupFactory_Invulnerability') && !F.IsA('UTPickupFactory_Invisibility') && !F.IsA('UTPickupFactory_Berserk')) );
    }
    
    defaultproperties
    {
       Name="Default__UTMutator_DuelRemove"
    }
    Which didnt work. Just didnt remove it.

    Next I tried a similar method suggested by MonsOlympus:
    Code:
    class UTMutator_DuelRemove extends UTMutator;
    
    function bool CheckReplacement(Actor Other)
    {
    	local UTPickupFactory F;
    
    	F = UTPickupFactory(Other);
    	if (F.IsA('UTPickupFactory_UDamage') || 
                F.IsA('UTPickupFactory_Invulnerability') || 
                F.IsA('UTPickupFactory_Invisibility') || 
                F.IsA('UTPickupFactory_Berserk'))
                        return false;
    
            return (F == None);
    }
    
    
    defaultproperties
    {
       Name="Default__UTMutator_DuelRemove"
    }
    Doesnt work either.

    Does UT3 hate me or what? :s

    #2
    i can't see anything wrong in the codes nor in the pickupfactory codes preventing it from getting destroyed but perhaps your mutator is not getting loaded even if it shows up in mutators list so make sure you placed it in correct folder or using the following commandline UseUnPublished

    Comment


      #3
      maybe just try to dispose of 'UTPowerupPickupFactory' ?

      Comment


        #4
        Your first version looks a lot more correct than the second one, which is bound to cause a lot of None accessing.
        Try adding some logs to see what's going on.

        Comment


          #5
          Originally posted by Eliot View Post
          i can't see anything wrong in the codes nor in the pickupfactory codes preventing it from getting destroyed but perhaps your mutator is not getting loaded even if it shows up in mutators list so make sure you placed it in correct folder or using the following commandline UseUnPublished
          The first time I thought it worked in UseUnPublished - so I placed it in the CookedPC folders and released it. Could you go into some more detail?

          maybe just try to dispose of 'UTPowerupPickupFactory' ?
          How else do I remove them?

          Your first version looks a lot more correct than the second one, which is bound to cause a lot of None accessing.
          Try adding some logs to see what's going on.
          Too much of a beginner for that. Sorry. :P

          Comment

          Working...
          X