Quote: Earlier versions of the game engine allowed swinging doors, and in fact the code to make swinging doors is still present in the game engine. However, the code for swinging doors has not been tested or updated since it was translated from the 16bit DOS game engine, so I would be suprised if it still worked. If so, swinging doors are created with extremely complicated Red Box values for a door. They did work, but it was really difficult to get them to operate correctly, and they suffered from several problems. 1.) The game engine does not have a physics-based collision detection system. This means trouble when a door is programmed to open towards you. In real life the door would knock you in the nose and you would step back. In the game engine world, what do we do? The door could pass through you which would be terrible and unrealistic. Or the door could stop when it touched you, which would mystify people who did not understand why they cannot open the door. Sure we could try to fake it by moving the player back when the door hits them, but then you have a whole host of new problems. There are myriad of situations where being knocked back by the door would cause more complicated situations, any one of which could result in being popped through a wall etc. 2.) Solid doors would not work, since rotating about a common point is a much easier case than sliding. All doors would look flat and that would be distracting. Anyway, here is the doc for making doors with the redbox numbers. The last four numbers in the univ??.txt lines described in the examples are your four redbox numbers. You would approach it by making a door with the level editor, and then changing all the redbox numbers below. I do not know if any of this still works, but you are welcome to try it out. --------------------- Door documentation. ------------------------------ Doors are species type 0 or 1 objects with bit 4096 set in the UNIV??.TXT object attribute. After the attribute, there are 3 numbers which specify the current state of the door. Various parameters of doors are specified using the 4 integers that follow the object attriute in the game_object structure. In the GCS layout editor, these are the 'red boxes' that appear if you select one single object and click on the 'EDIT ATTRIBUTES' menu item from the 'OBJECTS' pullown. To inspect some valid examples of door values, you can make a door with the GCS layout editor, and then select it and look at 'Edit Attributes' to see the 4 'red box' values. But after the attribute come 4 option numbers, which take on vastly different meanings for different species. With doors one of these numbers is used as an additional attribute bits for doors only. There is no collision because they are in different columns in the univ.txt entry. The parameters of a door are as follows: 1) door status. This is a composite number like object's attributes. In this number, the following bits are defined: BITSLIDE sliding door or rotating door? BITDIRECTION Does definition of OPEN mean max. angle or Min angle? BITXORY slide in x direction or y direction? BITBLASTABLE WILL the door open if within and explosion? BITMOVING Is door currently moving? ( not user setable) BITCURDIRECT Which way door is currently rotating BITNOSOUND If set, door makes no sound 2.) Door Min and Max angle. These are the door's minimum and maximum angles. Which of these is defined as door open is determinded by BITDIRECTION. 3.) Key value. This is the pickuptype number which must be in the player's inventory in order to open the door. For doors that open with no key, use pickup type 0. For doors that must be broken down, use pickuptype 10, which shows the user an explosion. For doors that must be kicked down, use pickup type 11, which show the user a kicking boot in the key-needed window. 4.) Timer Value. This is a number which specifies how long the door is to remain open after opening. The min time is 0, and the maximum time is about a minute. 5.) Hitpoints. This keeps track of how many hits points you have delivered to the door. You initialize it to a certain value, and as the user shoots/kicks it the hitpoints drop. There is a threshold system to make doors which are vulnerable to each kind of bombardment. First of all, the maximum and minimum angles of the door's traversal must be set. These are both numbers from 0 to 31, where 0 = 0 degrees rotations, and 31 = 348.75 degrees. To translate from degrees to this scaled down number, # = (angle)*32/360. You must drop the fractional remainder. Also, a door has two possible static (non-moving) states, closed and open. You can set the definition of closed to be the minimum angle, or the maximum angle by setting the BITDIRECTION in the doorstatus number. Doors stay opened for certain period of time, and then close. That delay time is setable. All doors will open when a guard approaches. Doors can also be broken down. A door will not open for the player who doesn't have the right key until its hitpoints are worn down to zero. Bumping into a door while walking will subtract 1 pt, kicking the door while bumping subtracts 2, and jumping while kicking the door subtracts 8. Doors have a natural threshold of damage, so that attempts to damage the door which have less that 1/4 of the current hitpoints will do no damage. Thus it is possible to make a door which can be opened with a jump kick in one blow, but can never be opened by simple bumping. HOW TO CREATE A DOOR Setting the first parameter after the object's attribute To create a door, just make an entry of a wall or shaped wall species object, and add 4096 to the attribute value. The next number after the attribute is the hit points of the door. Set equal to 1 for a one-bump door, 8 for a kick-down door. A door has a max htpts of 127. Hitpoints above 32 are invulnerable to even jump-kicking. The doorstatus number is melded with the above hitpoints number. To do this, multply the doorstatus by 256, and add the hit points. This number should form the the first number after the object attribute column in the UNIV.TXT file. The door status bits are as follows: 8 BITDIRECTION to reverse the definition of open. 32 BITSLIDE sliding door or rotating door? 1= sliding door, 0=rot 64 BITXORY slide in x direction or y direction? 0=slide in y 128 BITBLASTABLE WILL the door open if within and explosion? 1=yes 1 BITMOVING Is door currently moving? ( not user setable) 2 BITCURDIRECT Which way door is currently rotating Add 128 to this number to make the door silent. Setting the second parameter after the object's attribute The 2nd number after the attribute number contains the angles of the min and max of the door's opening. The minimum angle is placed in this column. Then multiply the maximum angle by 32, and add it to the minimum value. Now both angles are encoded into this one number. This is not used and must be zero or door width if using a sliding door. On a sliding door, this storage location is used to keep track of how far the door has slid. Now take a key value (0-63), and multply by 1024 and add this to the number. This # represents which key the player would need to open the door without violence. If no key is wanted, just leave this step out. Key #=0 means no key needed. Setting the third parameter after the object's attribute The 3rd number must always be zero to avoid conflicts with appliques. Setting the fourth parameter after the object's attribute The 4th number after the attribute number is the timer value. This value determines how long the door stays open after a guard walks through.The value is 0-31, but this value must be multiplied by 2048 before placing the number in the column. Thus 0 means no delay, and 2048 means a short delay of a second or so, and 63488 = 31*2048 means delay for a minute or so. Examples: These are example lines from a UNIV??.TXT file. This file has door objects at the various possible openings. The following door has a hinge on the right and opens away when the user is headed north in the positive x direction. 0 702 800 1525 36 -32768 4352 9 2567 0 4096 ;opening door The following door has a hinge on the left and opens away when the user is headed north in the positive x direction. 0 702 800 875 36 0 4352 2057 2336 0 4096 ;opening door This door opens away when user approaches pointed in the western direction. The hinge would be on the player's left, the southern edge of door. 0 702 3282 800 38 16384 4352 2057 2600 0 4096 ;secret door This door opens inward when usr is headed south. Hinge is on right side of south-facing player. 0 724 -2800 1677 32 -4096 4352 9 2072 0 4096 ;opening door The following door slides in a direction perpendicular to the door's surface, thus looking like a WOLF secret passage. 0 731 2000 -3600 0 -16384 4384 10249 8192 0 4096 ;opening door ; sliding door, slides ; inward, not sideward ; requires top secret memo The folling door slides to the right when the user is looking NORTH. 1 1515 -1170 4200 0 0 4384 10249 3272 0 4096 ;opening door Sliding electrified door which slides to the left when facing north. Key is pickup item 4. Notice that the object's attribute is 8 greater than above; that is the electrified bit being set. 0 703 3200 4000 0 0 4392 10249 4096 0 4096 ;opening door The folling door slides to the right when the user is looking EAST; there is no key needed to this door. 0 702 1540 1620 20 -16384 4384 24585 0 0 4096 ;opening door From the description above, you make a door status number by adding the bit values that you want together to form a number, for example: If you wanted a sliding door that was blastable, you'd add BITSLIDE (32) + BITBLASTABLE (128) and this would give you a door status num of 160. Then you would multiply the door status num by 256 and add the hitpoints for the door. If the hitpoints on the door were 16, then to get the number for the 1st red box, you'd put in: 160 * 256 + 16= 40976 But I don't have much optimism that the swinging door code still works. Some of the other red-box things may interfere, or other changes to the game engine may have broken them. Kevin Stokes