Classes:ThrustFloor


Classes: ThrustFloor
ThrustFloorDown
ThrustFloorUp
ThrustFloor defines the behavior of spikes, and it is its children classes that should be used in a map. The first argument determines whether it starts raised (true) or sunk (false), and the second determines whether it is bloody (true) or not (false). These values are changed during play. A_ThrustInitDn creates dirt clumps that are then destroyed by A_ThrustRaise, leaving some short-lived dirt instead. Many flags are also set and reset by these functions, erasing most other flags that could be added to a custom object.

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's actually harmful as it can 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.
  5. There is only one exception: if what you want is changing Ammo capacity, you need to create a new type from Ammo.
Spike
Actor type Hazard Game
DoomEd Number None Class Name ThrustFloor

DECORATE definition

ACTOR ThrustFloor native
{
  Radius 20
  Height 128

  action native A_ThrustRaise();
  action native A_ThrustImpale();
  action native A_ThrustLower();
  action native A_ThrustInitDn();
  action native A_ThrustInitUp();

  States
  {
  ThrustRaising:
    TSPK A 2 A_ThrustRaise
    Loop
  BloodThrustRaising:
    TSPK B 2 A_ThrustRaise
    Loop
  ThrustLower:
    TSPK A 2 A_ThrustLower
    Loop
  BloodThrustLower:
    TSPK B 2 A_ThrustLower
    Loop
  ThrustInit1:
    TSPK A 3
    TSPK A 4 A_ThrustInitDn
    TSPK A -1
    Loop
  BloodThrustInit1:
    TSPK B 3
    TSPK B 4 A_ThrustInitDn
    TSPK B -1
    Loop
  ThrustInit2:
    TSPK A 3
    TSPK A 4 A_ThrustInitUp
    TSPK A 10
    Loop
  BloodThrustInit2:
    TSPK B 3
    TSPK B 4 A_ThrustInitUp
    TSPK B 10
    Loop
  ThrustRaise:
    TSPK A 8 A_ThrustRaise
    TSPK A 6 A_ThrustRaise
    TSPK A 4 A_ThrustRaise
    TSPK A 3 A_SetSolid
    TSPK A 2 A_ThrustImpale
    Loop
  BloodThrustRaise:
    TSPK B 8 A_ThrustRaise
    TSPK B 6 A_ThrustRaise
    TSPK B 4 A_ThrustRaise
    TSPK B 3 A_SetSolid
    TSPK B 2 A_ThrustImpale
    Loop
  }
}
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.