View Full Version : damage vehicles only
CybZ
3rd Aug 2005, 06:10 PM
I'm trying to make a volume that will damage vehicles only, but players can pass trough without taking damage, if you dont know how but you know a map that has this please tell me, thanks for help.
SuperApe
4th Aug 2005, 10:31 PM
Off hand, I can't think of a map that has this.
But, it sounds pretty easy to make.
It sounds like a custom subclass of PhysicsVolume
that simply checks if the Pawn is a Vehicle.
Give me a minute...
SuperApe
4th Aug 2005, 10:59 PM
Here goes.
Let us know if there are problems.
//=============================================================================
// VehiclePhysVolume.
// by SuperApe -- Aug 2005
//=============================================================================
class VehiclePhysVolume extends PhysicsVolume;
simulated event Touch(Actor Other)
{
if ( !Other.IsA('Vehicle') )
return;
Super.Touch(Other);
}
function CausePainTo(Actor Other)
{
if ( !Other.IsA('Vehicle') )
return;
Super.CausePainTo(Other);
}
CybZ
5th Aug 2005, 01:58 AM
Awesome just what i needed, thanks a lot.
SuperApe
5th Aug 2005, 01:18 PM
Sorry, I forgot to actually set the DamagePerSec and bPainCausing properties in that test map, but you get the idea. :D
vBulletin® v3.8.0 Release Candidate 2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.