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.
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
|
Custom bridge | |||
---|---|---|---|
Actor type | Bridge | Game | ![]() |
DoomEd Number | 9991 | Class Name | CustomBridge |
Classes: CustomBridge
→Bridge
→ZBridge
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 { +SOLID +NOGRAVITY +NOLIFTDROP +ACTLIKEBRIDGE Radius 32 Height 2 RenderStyle None action native A_BridgeInit(class<Actor> balltype = "BridgeBall"); States { Spawn: TLGL ABCDE 3 Bright Loop See: TLGL A 2 TLGL A 2 A_BridgeInit TLGL A -1 Stop Death: TLGL A 2 TLGL A 300 Stop } }
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.