List of codepointers

From Eternity Wiki
Jump to navigationJump to search

This list of codepointers is a list of all the action routines which can be used in EDF frames. They are common for all games, so for example Heretic codepointers can be used in Doom.

You can specify the codepointers with or without their internal A_ prefix, even inside DECORATE state syntax. For simplicity, they will be referred in this wiki without the prefix.

Note that some codepointers, inherited from MBF, use the misc1 and misc2 frame properties, instead of the more general args list. Side effects aside, this also means that they will not be usable in the DECORATE syntax, but they all have DECORATE-compatible equivalents.

IMPORTANT: Do not provide more nonzero arguments to the codepointers than specified in the reference. Doing so may break forward compatibility with versions of Eternity that implement new functionality to codepointers.

Back to EDF state reference
Back to Eternity Engine

Player guns

Attacks

Parameterized

Name Description
CustomPlayerMelee Configurable player melee attack.
FireCustomBullets Configurable player bullet (hitscan) attack.
FirePlayerMissile Configurable player projectile attack.
PlayerThunk (deprecated) Run monster-specific codepointers as weapon actions.

Classic

These exist to support the vanilla Doom player attacks.

Name Description
FireBFG BFG9000 attack.
FireCGun Chaingun attack.
FireMissile Rocket launcher attack.
FireOldBFG Alpha Doom BFG attack (made available since MBF).
FirePistol Pistol attack.
FirePlasma Plasma rifle attack.
FireShotgun Shotgun attack.
FireShotgun2 Super shotgun attack.
Punch Fist attack.
Saw Chainsaw attack.

Control

Name Description
CheckReload Super shotgun reload check.
CheckReloadEx Extended version of CheckReload that allows counter comparison.
JumpIfNoAmmo Jumps to a state if ammo is gone.
Lower Action during a weapon's lowering sequence.
Raise Action during a weapon's raise sequence.
ReFire Skip frame if shooting is sustained (e.g. for plasma rifle's cooldown effect).
WeaponReady Action during a weapon's idle sequence.

Other

Name Description
EjectCasing Used for the effect of throwing casing.

Muzzle flash effects

Name Description
GunFlash Produces a gun flash sprite without firing anything at the current moment.
Light0 Resets the gun flash light level.
Light1 Sets the gun flash light level to 1.
Light2 Sets the gun flash light level to 2.

DOOM gun sound effects

Name Description
BFGSound Plays the BFG charge-up sound effect.
CloseShotgun2 Plays the super shotgun closing sound effect. Also includes ReFire.
LoadShotgun2 Plays the super shotgun loading sound effect.
OpenShotgun2 Plays the super shotgun opening sound effect.

Frame scripting

Name Description
PlayerStartScript Starts map script, as from a player weapon.
WeaponCopyCtr Copy counter value to another counter.
WeaponCtrOp Computer operation between two counters, storing result into another counter.
WeaponCtrJump Change to a given state, based on a counter's value.
WeaponCtrSwitch Change to a state from a given list, depending on a counter's value.
WeaponSetCtr Assign value to a counter.

Map objects

Simple movement

These operations perform simple effects on thing's direction, position or velocity. The available codepointers are:

Name Description
Face Face a specified angle.
Stop Set velocity to 0.
Turn Turn around by a specified angle.

Explosions and flames

BFG9000

Name Description
BFG11KHit SMMU BFG variant.
BFGBurst Produces a burst of smaller plasma projectiles.
BFGSpray Original Doom BFG explosion damage-inflicting afterglow.
BouncingBFG SMMU bouncing BFG.

DOOM 2 Final boss

Name Description
BrainExplode Brain perpetual explosion controller.
BrainScream Giant demon wall explosion sequence.
SpawnFly Spawn cube controller.

Explosions

Name Description
Detonate Thing damage controlled explosion.
DetonateEx Parameterized detonate action.
Explode Rocket/barrel splash damage.
HticExplode Heretic-compatible explosion.
Mushroom MBF-style mushroom explosion.
Nailbomb SMMU-style explosion with shrapnels.

Homing projectiles

Name Description
GenTracer Generic homing projectile.
HticTracer Heretic nitrogolem homing projectile.
Tracer Revenant homing projectile.

Others

Name Description
Fire Stick on the face of attacker's target, like the archvile's fire effect.
Heretic specific
Name Description
BeastPuff Weredragon fire projectile smoke.
BlueSpark Create a blue D'sparil attack projectile.
GenWizard Spawn a disciple of D'sparil.
LichFireGrow Expand the iron lich fire column projectile.
LichIceImpact Explode iron lich ice globe into shards.
MntrFloorFire Used by the maulotaur ground fire projectile.
PhoenixPuff Phoenix rod missile trail.
PodPain Special effect when pod is damaged.
VolcBallImpact Heretic volcano lava ball impact.
WhirlwindSeek Homing behaviour used by iron lich tornado projectiles.

AI

Name Description
AlertMonsters Shout so other monsters chase the player.
Chase Pursue a target and check for attacks
CPosRefire Go to seestate if target is out of sight.
FaceTarget Turn to target, looking around it if it's partially invisible.
GenRefire Customizable refire control.
KeepChasing pursue target without attacking.
Look Stand in guard, looking for targets.
RandomWalk Random wandering for inactive enemies.
Sor1Chase D'sparil's mount specific chase.
Sor1Pain D'sparil's mount specific twitch. Calls Pain.
SpidRefire Like CPosRefire, slightly modified.
VileChase Same as Chase, but resurrects encountered cadavres.

AI attacks

Parameterized

Original Doom

Heretic

Alterations

  • BossDeath: special monster death functions (such as Baron death in E1M8)
  • BrainDie: exits the level
  • CasingThrust: movement for ejected casing
  • Die: causes suicide
  • FadeIn: increments alpha
  • FadeOut: decrements alpha, DOESN'T destroy the thing
  • Fall: remove SOLID flag (used on dying monsters)
  • HideThing: Sets DONTDRAW flag on an object
  • KeenDie: open 666-tagged doors on death of all like-named monsters
  • KillChildren: destroy all summoned things
  • LineEffect: activate a tag using a special
  • PainNukeSpec
  • RestoreArtifact: Adds the SPECIAL flag back to an object, sets the object back into its spawnstate, and plays the object's seesound.
  • RestoreSpecialThing1: Removes the DONTDRAW flag from an object. If the object defines the itemrespawnat property, it will at this time be moved to a random spot if any such spots exist on the map (otherwise the item will remain where it spawned originally). The item will play its seesound.
  • RestoreSpecialThing2: Adds the SPECIAL flag back to an object and sets the object back into its spawnstate.
  • SetFlags: alter flags
  • SetTranslucent: modify alpha amount; setup additiveness or fuzziness
  • ShowMessage: display text message
  • Spawn: create another object on top of this one
  • SteamSpawn: create steam effects
  • UnHideThing: Unsets DONTDRAW flag on an object
  • UnSetFlags: alter flags

Heretic

Sound effects

  • AmbientThinker: ambient sound maintenance
  • BabyMetal: bspwlk sound effect — also includes Chase!
  • BrainAwake: loud bossit sound effect
  • BrainPain: loud bospn sound effect
  • FatRaise: mancubus warning — also includes FaceTarget
  • FireCrackle: flame sound effect — also includes "Fire" action!
  • Hoof: cyberdemon hoof sound — also includes Chase!
  • Metal: metal sound effect — also includes Chase!
  • Pain: play pain sound
  • PlayerScream: player-specific, health-dependent (death) sound
  • PlaySound: custom sound
  • PlaySoundEx: extended custom sound
  • Scream: play death sound
  • SkelWhoosh: revenant swing noise — also includes FaceTarget
  • SpawnSound: boscub sound effect — also includes SpawnFly
  • StartFire: flamst sound effect — also includes "Fire" action!
  • VileStart: archvile heat-up noise
  • XScream: extreme death gut noise

Frame scripting