How can I just disable all telefragging on all pawns all the time?

I am constantly finding new reasons why my pawns are getting telefragged (or somehow getting destroyed, and I’m pretty sure it’s telefragging) and I am constantly finding new ways to work around it. It’s driving me insane. I’m constantly setting SetPhysics(PHYS_None), SetCollisionType(COLLIDE_NoCollision), bBlocksTeleport=false, bNoEncroachCheck=true, and still I find that pawns are getting destroyed after teleport or when I load the game. It’s driving me insane.

I just want to disable telefragging for all pawns at all times. Under no circumstance should any pawn ever try to telefrag another pawn or allow itself to be telefragged. How can I set that?

Sounds like something hardcoded, maybe you can set your pawns to inherit from a simpler less-derived pawn class and that will help with that. My pawns inherit from GamePawn and don’t telefrag each other even if spawned at the same XYZ

That’s not a bad idea, but my pawns extend Pawn, which extends Actor. It doesn’t get much simpler than that.

Is there a way to log why a pawn is being destroyed? In Destroyed() I log the pawn’s location, to make sure it isn’t being destroyed because of KillZ. Is there a way to trace which function told the pawn to destroy itself? Is this an issue for breakpoints? Can I set breakpoints in UnrealScript? Do I have to compile a debug version to make the breakpoints work?

And now that I’m thinking about it, maybe I should disable KillZ too. Will pawns just stay on the floor if they hit the bottom of the game world?


as tegleg said, ScriptTrace()
I don’t see how this might be an issue for breakpoints
you can compile a debug version of your unrealscript code and have breakpoints working, yes
if you disable KillZ pawns will continue to fall, as the bottom of the game world is not really a floor (but maybe you could add a floor)

Thanks tegleg and Chosker. I can’t believe I’ve never used ScriptTrace() and GetFuncName() after all these years.

Unfortunately, Destroy() is native final, which makes inserting a ScriptTrace there more complicated. Maybe I can still glean some information from the overridden Destroyed() event. Or I’ll just go set some breakpoints.

Thanks again.

OK, I found it. The problem is with with the Pawn event EncroachedBy. I blanked that out in my pawn class, and I think I’ve ended the scourge of telefragging that has murdered hundreds of thousands of innocent pawns in my game world.