I'm trying to make a mutator for my server, but can't work out how to get the key part to work.
What I'm trying to do is write a mutator that replaces the flak cannon with a 1-shot-kill flak cannon, but ONLY for my nickname. Basically, the idea is, I'm the admin; p*ss me off and die. I don't use the flak cannon usually, so that's the favourite for swapping.
What I've tried so far is to have the ProcessTouch method check for Other.Name, like this:
However, I get the following problem:
I get the feeling I'm missing something...
How can I get this to work?
Thanks
What I'm trying to do is write a mutator that replaces the flak cannon with a 1-shot-kill flak cannon, but ONLY for my nickname. Basically, the idea is, I'm the admin; p*ss me off and die. I don't use the flak cannon usually, so that's the favourite for swapping.
What I've tried so far is to have the ProcessTouch method check for Other.Name, like this:
Code:
if ( Other.Name == "Burningmace" ) {
Other.TakeDamage( 50000, Instigator, HitLocation, (MomentumTransfer * Velocity/speed), MyDamageType );
} else {
Other.TakeDamage( Max(5, Damage - DamageAtten*FMax(0,(default.LifeSpan - LifeSpan - 1))), Instigator, HitLocation, (MomentumTransfer * Velocity/speed), MyDamageType );
}
However, I get the following problem:
Code:
AdminFlakChunk.uc(38) : Error, Types are incompatible with '=='
Compile aborted due to errors.
Failure - 1 error(s), 0 warning(s)
I get the feeling I'm missing something...
How can I get this to work?
Thanks