From Eternity Wiki
Jump to navigationJump to search

ACS built-in function[edit]

SpawnProjectile(int tid, string type, int angle, fixed speed, fixed vspeed, bool gravity, int newtid)

Spawns and throws a projectile. Parameters are:

  • tid: tag of things to spawn projectiles from. One projectile is spawned for each tagged thing. As usual, it can be activator or any of the four coop players; see tid for info.
  • type: name of thingtype to spawn as projectile. NOTE: this also supports the ZDoom names of things. See "compatname" from thingtype if you want to use those names. It's not limited to projectiles, any thing class would work.
  • angle: byte angle of projectile direction.
  • speed: expressed in fixed point (use the decimal point to get correct values). This is in eights of units actually; to achieve a speed of 10 for example (like the imp fireball), use 80.0.
  • vspeed: vertical speed. Same measurement unit as speed
  • gravity: if nonzero, projectile will be subject to low gravity (it will get the LOGRAV thing flag). Applies even if original definition can't fall.
  • newtid: optional TID to give the new thing, so it can be tracked by subsequent ACS functions.


The spawned thing will play its sight sound. It does not need to be a projectile; you can use this function to spawn monsters too, and if gravity is 0, such monsters will fly. Be careful however, unlike dedicated thing spawners, this function doesn't check if the thing can fit, so it can spawn stuck monsters. This function was mainly designed to spawn projectiles.

See also[edit]

Linedef specials[edit]