Page 1 of 1

Door Transition question

Posted: Wed Feb 22, 2006 3:45 pm
by terror2001
Goal: To have just a door transition without a door being visible on normal door openings.

What I have currently is an onheartbeat script that is very simple and direct.

Code: Select all

// Used mainly for Doors to just leave a transition.

void main()
{
    DestroyObject(OBJECT_SELF);
}
The problem is the script keeps running every 6 seconds even after the door is drestoyed.

So, does anyone know an alternate way to accomplish leaving a door transition without a door being visible in normal door openings?

Terror2001

Posted: Wed Feb 22, 2006 4:27 pm
by Silverdragonams
I've seen a hak pack that adds a variety of doors including a blank area transition that fits in the doorway. If that is what you are looking for, I can dig it up.

Posted: Wed Feb 22, 2006 4:28 pm
by Arkonswrath
IIRC you can have a door set up to be destroyed in the mod.

Place the door. Open the properties on it. Set the initial status as destroyed.

The transition will still be there, but the door wont be.

Posted: Wed Feb 22, 2006 4:48 pm
by terror2001
Arkonswrath wrote:IIRC you can have a door set up to be destroyed in the mod.

Place the door. Open the properties on it. Set the initial status as destroyed.

The transition will still be there, but the door wont be.
If you are talking about Initial State on the Advanced tab I do not get a "Destroyed" option in the dropdown. I only have "Closed", "Opened 1", and "Opened 2".

I know placables have Initial State options of "Activated", "Deactivated", and "Destroyed", but doors apprarently do not from what I can find.

Posted: Wed Feb 22, 2006 6:14 pm
by JollyOrc
Put the script into the onenter of the area that contains that door. Don't use object_self then of coure :)

Posted: Wed Feb 22, 2006 6:39 pm
by terror2001
JollyOrc wrote:Put the script into the onenter of the area that contains that door. Don't use object_self then of coure :)
No, but thanks for the suggestion. :)
That would be a mess to have different area onenter scripts which are mostly used for player tracking and other core functions. Otherwise, if I edited the single area onenter script to include this sort of check it would happen in all areas and waste system cpu the bulk of the time, which is what's happening right now with the script on the doors' onheartbeat event, and what I want to get away from.

I've tried even to create custom doors whose Appearance Type would be like CaveExit or other non-visible door appearances, but when I place the door in the doorway the appearance goes back to a Generic Appearance type.

CaveExit is similar to what I'm trying to get to. A door transistion without a visible door.

Posted: Wed Feb 22, 2006 6:58 pm
by terror2001
A workaround I came up with, that I do not like because it's klugy and this problem seems like it should be simpler than it's turning out to be, is to make an invisible placable and put a script on it's onheartbeat event.

Code: Select all

void main()
 {
     int i = 1;
     object oDoor = GetNearestObject(OBJECT_TYPE_DOOR, OBJECT_SELF, i);
     int nDieDoorDie = GetLocalInt(oDoor, "KillMePlease");
     while (!(oDoor == OBJECT_INVALID)) {
         if (nDieDoorDie != 0) {
             DestroyObject(oDoor);
         }
         oDoor = GetNearestObject(OBJECT_TYPE_DOOR, OBJECT_SELF, i++);
         nDieDoorDie = GetLocalInt(oDoor, "KillMePlease");
     }
     DestroyObject(OBJECT_SELF);
 }
Then place that placable in the specific area, where the door is that is flagged to be destroyed.

The script would destroy the door(s) that are flagged, and the placable itself when the module loads, and then neither door nor placable onheartbeat scripts are firing after that.

Like I said, this problem seems simpler than it's turning out to be, but I'm at a loss how to make it simpler.

Terror2001

Posted: Thu Feb 23, 2006 3:03 am
by JollyOrc
If this is something you need more than once:

Edit the standard onenter script to check for the presence of a special variable for that area iHasDestroyedDoors.

If this is set to true, cycle through all doors within that area. If the door has the variable iDestroyMe set, destroy it.

After doing this, clear the variable on that area, so the cycle won't be started again when someone re-enters that area.

Heartbeats are evil.

Posted: Thu Feb 23, 2006 7:24 am
by jaythespacehound
There is a "doorway" under Misc Interior placeables that has the destroyed state iirc

Posted: Thu Feb 23, 2006 9:49 am
by Silverdragonams
I have that hak that will add a doorless area transition. It would be a simple matter to add it to your own hak pack. If you want it I just need an email address to send it to.

Posted: Thu Feb 23, 2006 1:36 pm
by terror2001
I knew it had to be simpler. :)
terror2001 wrote:Goal: To have just a door transition without a door being visible on normal door openings.

Does anyone know a way to modify the appearance of doors, similar in concept to CaveExit, where you just have a door transition without a visible door?
I have tried making custom doors and changing the appearance to just about every sort of appearance available, but when I place the door in the doorway the appearance reverts back to a Generic Type.
Doorman1970 wrote:Place the door, then go into it's properties from there to change its appearance.

You can also create a new door with the appearance you want, then place them in the area and do an Update Instances if they appear. This tends to work intermittently though.
terror2001 wrote:Once the door is placed the Appearance Type and Generic Appearance dropdowns are greyed out, so I cannot change anything.

The update instances worked though. Thanks a bunch. :)