From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do NOT need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it will cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
Custom bridge
Actor type Bridge Game MiniZDoomLogoIcon.png (ZDoom)
DoomEd Number 9991 Class Name CustomBridge

Classes: CustomBridge

CustomBridge can be used to create either a Doom-style or Hexen-style invisible bridge, and can also further customize the appearance and behavior of the rotating "bridge balls" when used as a Hexen-style bridge.

When placed in a map, the bridge's arguments control its appearance and behavior, as follows:

  • Arg 1: Bridge radius, in mapunits
  • Arg 2: Bridge height, in mapunits
  • Arg 3: Number of bridge balls to display.
  • Arg 4: Rotation speed and direction of bridge balls. 0 uses Hexen's default. Values from 1-128 rotate counterclockwise, while values from 129-255 go clockwise. For example:
  • 0: Hexen default
  • 11: 15° / second
  • 21: 30° / second
  • 32: 45° / second
  • 64: 90° / second
  • 128: 180° / second
  • 192: -90° / second
  • 223: -45° / second
  • 233: -30° / second
  • 244: -15° / second
  • Arg 5: Rotation radius of bridge balls, in bridge radius %. 0 is Hexen-default (15 units regardless of bridge radius)

Note: When inheriting from this actor in Decorate, you can redefine the Spawn state to change the way the bridge behaves as a Doom-format bridge (Arg 3 set to 0), or the See state to alter the way it behaves as a Hexen bridge. This can be used, for example, to change which actors are spawned instead of the bridge balls.

DECORATE definition

ACTOR CustomBridge native
  Radius 32
  Height 2
  RenderStyle None

  action native A_BridgeInit(class<Actor> balltype = "BridgeBall");

    TLGL ABCDE 3 Bright 
    TLGL A 2
    TLGL A 2 A_BridgeInit
    TLGL A -1
    TLGL A 2
    TLGL A 300