A_ShedShard

From ZDoom Wiki
Jump to navigation Jump to search

A_ShedShard
(no parameter)

Creates new FrostMissiles if the calling actor's special2 counter is greater than zero. The direction in which these new missiles will be spawned depend on special1, used as a flag array:

  • 1: Left
  • 2: Right
  • 4: Up
  • 8: Down

If special1 is 15, four new missiles will be created. In any case, the newly-created missiles will have their special2 set to one less than the calling actor's, and their first argument set to 2 or 0 depending on whether the calling actor's special2 is 3 or not. The spawned missiles share the calling actor's target. Other aspects depend on the spawned missile's direction:

Left and right
A new missile is created at the calling actor's position, going at a horizontal angle of 5° in the appropriate direction. The new missile's special1 is set to only left or right, as appropriate. Its vertical velocity is the same as the calling actor's, but its horizontal velocity depends on the calling actor's special2, using this formula:
velocity = 20 + 2 * (special2 - 1)
Up and down
A new missile is created eight map units above or below the calling actor. The new missile's special1 is set to up or down as appropriate, as well as left and right if the calling actor's special2 is an even number. Its vertical velocity is the same as the calling actor's, but its horizontal velocity depends on the calling actor's special2, using this formula:
velocity = 15 + 2 * (special2 - 1)

This codepointer is restricted to FrostMissile and derived classes.