Depends on what function/result is. If is simply a different effect upon pawn death, there may be an easy way of handling this without subclassing xPawn. If you are trying to alter some other behavior (like how physics notification like 'landed' or 'hitwall' are handled) then you will probably need to subclass.
(the following is all from memory, so it might not be completely correct) When an xPawn dies the bTearOff flag is set to true, this means that clients no longer receive any networks updates about the "dead" pawn. The reason why this matters is that I'm not sure if you will be able to set "bHidden" to true before the replication is broken off with other clients.
This matters because you can always try spawning "dummy" actors that look/behave like a pawn that has just died (using a GameRule subclass spawned by a mutator), and hide the original dead pawn. I may have some example code lying around to post later.
What is the function/effect you are going for?
Hi.Thanks for the reply.
Well there are a few things I'm going for. I took a look through the xPawn code to see which functions I might need to use. Turns out there are quite a few. Here are my ideas/ a rough idea of the functions I'll need to alter:
1. When a player gets blown to pieces/ skeletized, death screams should keep playing all the way through. In the film Army of Darkness, a load of zombies get blown apart at the end of the film and their screams continue as they get blown to bits. It's hilarious. I'm planning on adding those screams into this mod. PlayDyingSound().
2. Players should be able to get set on fire and stay on fire for a while when they're still alive if they get shot by a rocket launcher/ shock rifle/ link gun/ lightning gun. TakeDamage().
3. Corpses should not disappear unless they take a lot of damage. DoRezEffect(), TakeDamage().
4. A lot more gibs should come out when someone dies. ProcessHitFX(), DoDamageFX().
5. Corpses should go flying further and more spectacularly. PlayDying(), PlayDyingAnimation().
6. Giblets should stay around for longer. SpawnGiblet(), SpawnGibs().
7. More blood should come out when you shoot someone, and should stay around longer. PlayHit().
8. It should be harder to gib someone with the flak cannon. Instead they should get blasted backward with great force, so they go flying off into the distance, while a load of blood splatters out of their body. Alternately, they could get skeletized, with a load of gibs splattering everywhere, and the skeleton getting blasted backward. PlayHit().
9. Corpses should convulse randomly when something happens nearby. KSkelConvulse().
It seems like it would be quite hard to do all that with just a mutator! I'm guessing I'm going to have to subclass xPawn after all, right?
Again, thanks for replying.
BTW it would be interesting to hear what anyone thinks to the proposed features I mentioned.
Cheers.