ADoor

From Data Realms Wiki

Revision as of 21:25, 10 June 2010 by Petethegoat (Talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ADoor

An ADoor in use.
While the door opens for the actor of the same team as it, the enemy must destroy the door to get through.
Class Information
Class Name: ADoor
Parent: Actor
Limbs: 1 door
Abilities:
Opening, Closing, Sensing Actors


ADoors are actors that act as a door. Their name is an amalgam of Actor and Door.

ADoors have one door that either slides or rotates, usually for the purpose of opening and closing, allowing actors of the same team through a path, but acting as an obstacle to enemies.

The actor itself usually plays the role of the engine of the bunker door, playing an animation when the door moves.

They detects actors of the same team using sensors, which are invisible rays cast between two positions defined in relation to the ADoor through Offsets.


Variables

  • Door [Attachable]
  • OpenOffset [Vector]
  • ClosedOffset [Vector]
  • OpenAngle [Matrix]
  • ClosedAngle [Matrix]
  • OpenClosedAngle [Matrix]
  • OpenClosedOffset [Vector]
  • DoorMoveTime [Int]
  • ClosedByDefault [Boolean]
  • ResetDefaultDelay [Int]
  • SensorInterval [Int]
  • AddSensor [Sensor]

As well as all variables used by Actors.

Sensors

Sensors detect actors and cause the door to open.

  • StartOffset [Vector]
  • SensorRay [Vector]
  • SkipPixels [Int]

Example from the "Door Slide Short" ADoor:

   AddSensor = Sensor
      StartOffset = Vector
         X = -48
         Y = 50
      SensorRay = Vector
         X = 52
         Y = 0
      SkipPixels = 6

Example

This image should help you with figuring out how this stuff works. In the image example, The door from The Bridge Door mod (TroubledWaters.rte) is used. The door, on sensing that an actor is on either side, lowers, and allows the actor to cross a gap.

HowDoorsWork.png

Note: "Actors are only sensed when intersecting this line" That means that an atom from the actor has to physically be on one of the same pixels as the line. As long as an actor is in the line, the door will stay open. Also note that I should have used a straight line, like Data does in his Doors. If the line is at a diagonal like that, then an actor might crawl under the sensor on one side. It won't make much of a difference for small doors, but for big doors, that could be a problem.

Personal tools