SetLineBlocking

From ZDoom Wiki
Jump to navigation Jump to search
Nuvolabomb.png Warning: The feature described on this page has been deprecated, and will no longer be supported or updated by the GZDoom developers. While some functionality may be retained for the purposes of backwards-compatibility, authors are strongly discouraged from utilizing this feature in future projects and to instead use Line_SetBlocking. Compatibility with future GZDoom versions is not guaranteed.

void SetLineBlocking (int lineid, int setting);

Usage

Sets the line blocking for a line. This can be set to block nothing, the player and monsters, or everything (including projectiles and hitscans). For readability, here are some definitions defined in zdefs.acs:

  • BLOCK_NOTHING — block nothing (turn blocking off)
  • BLOCK_CREATURES — block enemies and the player (walking things)
  • BLOCK_EVERYTHING — nothing can cross this line
  • BLOCK_RAILING — emulates Strife's railings
  • BLOCK_PLAYERS — block only players (but not monsters)

For compatibility with Hexen, you may also use ON in place of BLOCK_CREATURES and OFF in place of BLOCK_NOTHING.

Examples

  script 1 (int lineid)
  {
     SetLineBlocking(lineid, BLOCK_EVERYTHING);
     if(CheckInventory("BlueSkull"))
     {
        SetLineBlocking(12, OFF);
     }
  }

See also