Door Transition question

Forum for scripters of NWN material and third party applications.
Post Reply
terror2001
Ambassador: Greyhawk West
Posts: 70
Joined: Tue Jan 11, 2005 5:49 pm
Location: GMT -7(-6)

Door Transition question

Post 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
Terror2001

[quote="Aeveras"]Yeah, my favourite DM is [spoiler] and [FOIG]![/quote]
Silverdragonams
Planewalker
Posts: 46
Joined: Mon Sep 27, 2004 8:23 pm
Location: Hala Head DM

Post 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.
Arkonswrath
Ambassador: Hala
Posts: 447
Joined: Wed May 26, 2004 3:57 am

Post 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.
terror2001
Ambassador: Greyhawk West
Posts: 70
Joined: Tue Jan 11, 2005 5:49 pm
Location: GMT -7(-6)

Post 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.
Terror2001

[quote="Aeveras"]Yeah, my favourite DM is [spoiler] and [FOIG]![/quote]
JollyOrc
Ambassador: Tairis'nàdur
Posts: 380
Joined: Tue Nov 25, 2003 1:13 am
Location: Catar, D'Aton Academy of the Blade
Contact:

Post by JollyOrc »

Put the script into the onenter of the area that contains that door. Don't use object_self then of coure :)
bye,
JollyOrc
___________________
Tairis'nàdur - Senior DM, Catara World Owner
-= fewer rules - more fun =-
terror2001
Ambassador: Greyhawk West
Posts: 70
Joined: Tue Jan 11, 2005 5:49 pm
Location: GMT -7(-6)

Post 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.
Terror2001

[quote="Aeveras"]Yeah, my favourite DM is [spoiler] and [FOIG]![/quote]
terror2001
Ambassador: Greyhawk West
Posts: 70
Joined: Tue Jan 11, 2005 5:49 pm
Location: GMT -7(-6)

Post 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
Terror2001

[quote="Aeveras"]Yeah, my favourite DM is [spoiler] and [FOIG]![/quote]
JollyOrc
Ambassador: Tairis'nàdur
Posts: 380
Joined: Tue Nov 25, 2003 1:13 am
Location: Catar, D'Aton Academy of the Blade
Contact:

Post 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.
bye,
JollyOrc
___________________
Tairis'nàdur - Senior DM, Catara World Owner
-= fewer rules - more fun =-
jaythespacehound
Groundling
Posts: 93
Joined: Wed Feb 16, 2005 6:50 pm
Location: Hobart Australia

Post by jaythespacehound »

There is a "doorway" under Misc Interior placeables that has the destroyed state iirc
Silverdragonams
Planewalker
Posts: 46
Joined: Mon Sep 27, 2004 8:23 pm
Location: Hala Head DM

Post 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.
terror2001
Ambassador: Greyhawk West
Posts: 70
Joined: Tue Jan 11, 2005 5:49 pm
Location: GMT -7(-6)

Post 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. :)
Terror2001

[quote="Aeveras"]Yeah, my favourite DM is [spoiler] and [FOIG]![/quote]
Post Reply