I have done:
Code: Select all
class DecoupledWeapon extends Weapon;
function TraceFire( float Accuracy )
{
Log("TraceFire Runs!");
//Super.TraceFire(Accuracy); // dont run this for now
}
Code: Select all
class HelloWorld extends Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant) {
if ( Other.IsA('Weapon') && !Other.IsA('DecoupledWeapon')) {
ReplaceWith( Other, "DecoupledWeapon.DecoupledWeapon" );
return false;
//Other.Class = Class'DecoupledWeapon.DecoupledWeapon'; // this gives an compiler error: Can't assign Const variables
}
return true;
}
All I want to do it to Log that message every time any object/weapon or whatever is running the function TraceFire()
If I return false in CheckReplacement then all players will have no weapons and no weapons will be in entire arena.
If I return true then no difference from a normal game and will no be logging the message. What-a-hell?
I read the tut from https://wiki.beyondunreal.com/Legacy:CheckReplacement but it doesnot work for UT99