AreaDamage

Damages filtered entities in an Area.

Postal III Ultrapatch+Angel v1.3.0+ Feature

The following function will only work in Postal III Ultrapatch+Angel v1.3.0 or higher.

Syntax


// from AI_CR_DamageTypes.p3s
Const KNOCKOUT_NO,0
Const KNOCKOUT_YES,1

Const DMG_GENERIC,30                    // generic damage -- do not use if you want players to flinch and bleed!
Const DMG_CRUSH,0                       // crushed by falling or moving object. 
                                        // NOTE: It's assumed crush damage is occurring as a result of physics collision, so no extra physics force is generated by crush
                                        // DON'T use DMG_CRUSH when damaging entities unless it's the result of a physics collision. You probably want DMG_CLUB instead.

Const DMG_BULLET,1                      // shot
Const DMG_SLASH,2                       // cut, clawed, stabbed
Const DMG_BURN,3                        // heat burned
Const DMG_VEHICLE,4                     // hit by a vehicle
Const DMG_FALL,5                        // fell too far
Const DMG_BLAST,6                       // explosive blast damage
Const DMG_CLUB,7                        // crowbar, punch, headbutt
Const DMG_SHOCK,8                       // electric shock
Const DMG_SONIC,9                       // sound pulse shockwave
Const DMG_ENERGYBEAM,10                 // laser or other high energy beam
Const DMG_PREVENT_PHYSICS_FORCE,11      // Prevent a physics force
Const DMG_NEVERGIB,12                   // with this bit OR'd in, no damage type will be able to gib victims upon death
Const DMG_ALWAYSGIB,13                  // with this bit OR'd in, any damage type can be made to gib victims upon death.
Const DMG_DROWN,14                      // Drowning

Const DMG_PARALYZE,15                   // slows affected creature down
Const DMG_NERVEGAS,16                   // nerve toxins, very bad
Const DMG_POISON,17                     // blood poisoning - heals over time like drowning damage
Const DMG_RADIATION,18                  // radiation exposure
Const DMG_DROWNRECOVER,19               // drowning recovery
Const DMG_ACID,20                       // toxic chemicals or acid burns
Const DMG_SLOWBURN,21                   // in an oven

Const DMG_REMOVENORAGDOLL,22            // with this bit OR'd in, no ragdoll will be created, and the target will be quietly removed.
                                        // use this to kill an entity that you've already got a server-side ragdoll for

Const DMG_PHYSGUN,23                    // Hit by manipulator. Usually doesn't do any damage.
Const DMG_PLASMA,24                     // Shot by Cremator
Const DMG_AIRBOAT,25                    // Hit by the airboat's gun

Const DMG_DISSOLVE,26                   // Dissolving!
Const DMG_BLAST_SURFACE,27              // A blast on the surface of water that cannot harm things underwater
Const DMG_DIRECT,28
Const DMG_BUCKSHOT,29                   // not quite a bullet. Little, rounder, different.

Syntax

AreaDamage [dmg type],[dmg],[radius],[knockout],[filter1],[filter2],[filter3],.. -- Damages filtered entities

AreaDamage [dmg type],[dmg],[radius],1 -- Damage will knock everyone out if they die, will use Object:slot#7 as the inflictor if there's any.

Example


// From Tear Gas
xpt_damage
{
    actions
    {
        // This will Knock out nearby NPCs and the Player too!
        IfAttr "cr_gas == 1 Block begin"
            AreaDamage DMG_RADIATION,5,156,KNOCKOUT_YES
            Timer tDamage,1.5:3,repeated
        Block end
    }
}