A_CallSpecial

From ZDoom Wiki
Jump to navigation Jump to search

bool A_CallSpecial (int special, [int arg1, [int arg2, [int arg3, [int arg4, [int arg5]]]]])

This is used internally to convert an action special call in DECORATE into an action function the parser can recognize. It should generally not be used directly.

Examples

Take this sample DECORATE code:

Death:
  BOSS I 8
  BOSS J 8 A_Scream
  BOSS K 8
  BOSS L 8 A_NoBlocking
  BOSS M 0 Floor_LowerToLowest (17, 64)
  BOSS MN 8
  BOSS O -1
  stop

Internally, the Floor_LowerToLowest line is converted to this:

  BOSS M 0 A_CallSpecial (21, 17, 64)

Since 21 is the ID of the Floor_LowerToLowest special, this results in the special being called when this frame is processed at run-time. This conversion is done automatically by ZDoom, so you need not worry about specifying this yourself.

A possible deliberate use of this function is to have an actor run its special as part of its actor code instead of when activated. Using the variables available for DECORATE expressions, the state for this could be written like this:

  ACTR A 5 A_CallSpecial(special, args[0], args[1], args[2], args[3], args[4])