I’m trying to make a simple script that will transfer a modified amount of damage to the driver of a seat when the seat takes damage. With Jeeps, it seems to do this by default if you hit the correct location, however a player sitting in a seat is, for all intents and purposes… invincible.
This would seem as easy as adding an EntityTakeDamage hook, but even when I make a debug function like this:
[lua]local function DebugDamage( target, inflictor, attacker, damage, info )
print( target:GetClass() )
hook.Add( “EntityTakeDamage”, “DamageTest”, DebugDamage )[/lua]
It does nothing when I shoot the seat. When I shoot a prop, it prints “prop_physics” to the console, as expected.
Is there any workaround for this?
It works fine with the actual “jeep”, printing “prop_vehicle_jeep” to the console. But individual seats and pods remain unaffected.