Classes:BulletPuff
From ZDoom Wiki
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
|
| Bullet puff | |||
|---|---|---|---|
| Actor type | Explosive | Game | |
| DoomEd Number | None | Class Name | BulletPuff |
| Spawn ID | 131 | Identifier | T_PUFF |
Classes: BulletPuff
The puff spawned when a hitscan attack (i.e. bullet) impacts a wall in Doom and its derivatives. New puffs, incorporating custom sound effects, damagetypes and other behaviour, can be created in DECORATE by inheriting from this class.
Puff usage and behavior
Actors inheriting from this class:
- automatically move up 1 mappixel per tic (because of the vspeed property)
- may be replaced by particles when spawned if the ALLOWPARTICLES flag is set (and the player has the appropriate option enabled in their configuration settings)
- define the damage type of a hitscan attack if spawned using A_BulletAttack, A_CustomBulletAttack, A_FireBullets or A_CustomPunch
- obey the following rules regarding sounds and state jumps:
| Attack result¹ | Missed | Hit wall | Hit actor | |
|---|---|---|---|---|
| Attack type | All | Hitscan | Melee | |
| Puff sound played² | Active | Attack | See | |
| Puff state entered³ | Crash | Spawn | Melee | |
- Notes
- 1 - by default, puffs are only spawned as a result of a hitscan attack hitting a wall, or an actor with one or more of NOBLOOD, INVULNERABLE and DORMANT flags set. In order for puffs to appear in other circumstances, certain flags must be in effect on either the puff actor or the target actor. The ALWAYSPUFF flag applied to the puff actor makes it spawn even for missed attacks. The PUFFONACTORS flag applied to the puff actor will make it spawn (instead of Blood) even if the hit actor does not have any of the aforementioned flags.
- 2 - if no SeeSound is defined, the AttackSound is played instead. To have a silent SeeSound, you need to use SNDINFO to give a name to the internal sound lump DSEMPTY, and assign that sound to the SeeSound property.
- 3 - if no Crash or Melee state sequence is defined, the puff's Spawn state is entered by default.
- If a puff has an XDeath state defined, it will enter it upon hitting a bleeding actor, provided it also has the PUFFONACTORS flag.
If the puff has the THRUGHOST flag, it will not affect enemies with the GHOST flag.
Puffs are spawned so as to face the originator of the attack.
DECORATE definition
ACTOR BulletPuff
{
Game Doom
SpawnID 131
+NOBLOCKMAP
+NOGRAVITY
+ALLOWPARTICLES
+RANDOMIZE
RenderStyle Translucent
Alpha 0.5
VSpeed 1
Mass 5
States
{
Spawn:
PUFF A 4 Bright
PUFF B 4
// Intentional fall-through
Melee:
PUFF CD 4
Stop
}
}