No announcement yet.

Vehicle Explosion Always Suicide?

  • Filter
  • Time
  • Show
Clear All
new posts

    Vehicle Explosion Always Suicide?

    In my Vehicle Detonator mutator, whenever a vehicle explodes it counts all deaths related to the explosion as suicides (unless you're in the vehicle, that counts towards the person who caused the explosion).

    I do this by calling Died() on the vehicle and passing my own damage type & the Controller of the person who fired the detonator. Is there a different way I should be doing this, or something I need to do additionally so that this person also gets credit for deaths caused by the explosion? The exact block of code looks like this:

      Level.Spawn(GetDetonatorExplosion(), Level,,Owner.Location);
      if (None != ONSVehicle(Owner)) {
        ONSVehicle(Owner).ExplosionDamageType = GetExplosionDamageType();
      Vehicle(Owner).Died(ArmedBy, GetExplosionDamageType(),
    GetExplosionDamageType() returns my own custom damage type class with custom death messages; this is how I know the credit isn't being passed around properly. If player A detonates a vehicle and player B is inside the vehicle and player C is standing next to it, player B will get 'killed by A' but C will get 'C killed himself'.

    Anyone got an idea what I'm doing wrong?


    if (ArmedBy==NONE)
    log("ArmedBy equals NONE!");
    To see if ArmedBy points to a valid instigator....


      Thanks! That's a good idea, I'll give it a try as soon as I'm able (a couple of hours probably). ArmedBy is always specified when a detonator is primed, but I don't think I ever checked to make sure None wasn't being passed through at that point -- certainly worth checking out!

      One thing I should mention is that I added the line:

      Vehicle(Owner).Instigator = ArmedBy.Pawn;
      ...just before the Died() call at that fixed two of my four types of detonators. That the other two *don't* work still (ie. counts them as suicides) makes me wonder if your suggestion isn't going to turn up some Nones.

      I'll post and let you know how it works out!


        No dice

        I added the following in my Explode() method:

        if (None == ArmedBy) {
          Log("This exploding detonator wasn't armed by anyone!");
        } else if (None == ArmedBy.Pawn) {
          Log("This exploding detonator was armed by a controller with no pawn!");
        No logs are added though. So it looks like ArmedBy is non-None, and I assign ArmedBy.Pawn to the Instigator of the vehicle...shouldn't that be enough? It is for some of the explosions, but not for all of them somehow.

        It's not going to be a timing issue or something odd like that is it? Like the Instigator is cleared just before it's checked to see if it should be used for giving credit? This baffles me.


          I've figured out a little more. It looks like the key ingredient is that the detonator has to kill it's setter. Ie. if I set a detonator and it kills me when it explodes, ALL pawns killed by the detonator's explosion will be suicides -- except those IN the vehicle (if any) when it explodes.

          So if the detonator's armer is NOT killed by the explosion, s/he gets credit for all relevant kills, and they are not counted against the victims.

          Anyone understand why this would be the case? I mean, if you shoot a rocket launcher between yourself and someone else, and it kills both of you, it assigns you a kill & a suicide, and the victim just a death. I just want mine to act the same :P