PDA

View Full Version : What's wrong with this mut?



MysTikal
11-23-2007, 11:38 PM
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:


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:


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

Eliot
11-23-2007, 11:46 PM
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

kisk
11-24-2007, 12:21 AM
maybe just try to dispose of 'UTPowerupPickupFactory' ?

Wormbo
11-24-2007, 03:24 AM
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.

MysTikal
11-24-2007, 02:05 PM
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