RadiusAttack
Jump to navigation
Jump to search
Note: This feature is for ZScript only. |
native int RadiusAttack(Actor bombsource, int bombdamage, double bombdistance, Name bombmod = 'none', int flags = RADF_HURTSOURCE, double fulldamagedistance = 0.0, name species = "None")
Usage
Performs a radius attack, dealing damage and/or thrusting the victims. This is used internally by A_Explode, A_Detonate and A_RadiusThrust.
Parameters
- Actor bombsource
- Pointer to the actor that should be considered the source of the attack (the shooter). When calling in projectiles, use
target
.
- int bombdamage
- Damage to deal.
- double bombdistance
- The radius of the attack.
- Name 'bombmod
- Damage type of the attack. Default is 'none'.
- int flags
- Flags use by the attack. These are NOT the same as flags used by A_Explode, but their meanings are largely similar. Multiple flags can be combined with
|
:- RADF_HURTSOURCE — Set by default. The attack will hurt the bombsource actor (same as XF_HURTSOURCE in A_Explode).
- RADF_NOIMPACTDAMAGE — victims will not receive impact damage when colliding with something after being pushed by the explosion
- RADF_SOURCEISSPOT — the calling actor is considered to be the source (same as XF_NOTMISSILE in A_Explode)
- RADF_NODAMAGE — deal no damage, only thrust the victims (same as RTF_NOIMPACTDAMAGE in A_RadiusThrust))
- RADF_THRUSTZ — apply thrust to the victims' vertical velocity, not only horizontal (same as RTF_THRUSTZ in A_RadiusThrust))
- RADF_OLDRADIUSDAMAGE — (Need more info)
- RADF_THRUSTLESS — deal damage but don't thrust (same as XF_THRUSTLESS in A_Explode)
- RADF_NOALLIES — don't affect the allies of the bombsource actor
- RADF_CIRCULAR — changes the shape of the explosion from the vanilla cuboid shape into a spherical shape (same as XF_CIRCULAR in A_Explode)
- RADF_CIRCULARTHRUST — Blast actors away with more physically accurate momentum. When enabled, RADF_THRUSTZ is ignored. (New from 4.13.0)
- double fulldamagedistance
- The area within which full damage is inflicted. Beyond that area the damage will be subjected to linear falloff, tapering off at full bombdistance.
- name species
- If not
'none'
, only actors whose Species matches this name will be affected.
Return values
- int — returns the number of actors affected by the attack.
Examples
Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated. |