unreal-development-kitunrealscript

In UnrealScript, how do I make vehicles receive damage from ramming


In UDK the scale of damage for ramming vehicles is low, after adjusting it the vehicle the player drives receives collision damage, but the other vehicle does not, whether there is a bot inside or not. I tried handling the Bump event in Vehicle.uc (added it) and subtracting 50 Health, but that does not happen, the vehicle remains intact from vehicle collisions, but I damage it by running into it (on foot) or by other means of hitting it on something. Any clue as to what stops the vehicle from taking damage when hit by another vehicle?


Solution

  • It looks like UTVehicle::RigidBodyCollision() is what calls TakeDamage() when one vehicle runs into another. Might check if that's getting called properly on both vehicles in the event of a collision.