Server Totals
Deglos - (0)
Le'Or - (0)
Ferrell - (0)
Elysia - (0)
M'Chek - (0)
Mikona - (0)
Wilderness - (0)
Visimontium - (0)
Underdark - (0)
Total players: 0
Gallery
  • Winter Ball 2015
    Album name: DM Events
    Uploaded by: Ronan
    Uploaded: Sat Jan 03, 2015 4:41 pm

Links Menu

Adding a door

Moderators: Nighthawk4, Dungeon Masters

Adding a door

PostAuthor: Nighthawk4 » Sat Jul 03, 2004 8:51 pm

I am trying to add a door to the side of a large tree.

I add the Doorway - I tried various different ones - the result is the same for all of them.

I make the doorway useable, but when I click on it, the door does not open.

Also, there does not seem to be any way to add a Transition from this doorway to the other door.

I assume it needs a custom script - I don't have a clue how to do that.

Also, how do I add it to the side of a tree without it either sticking out in mid-air or being hidden by part of the tree?

Any help please? :?
Life is never as bad as you think it is, although that doesn't help at the time.

Orleron wrote:I think it's a fun idea if you can idiot-proof it. Problem is God always builds a better idiot. :P


Please visit:
Avlis UK, ACE Forum and SATF Forum

Image
User avatar
Nighthawk4
Eldest DM
Eldest DM
 
Posts: 23988
Images: 2
Joined: Fri Feb 07, 2003 8:32 pm
Location: The Home of the Bard of Avon
Timezone: GMT
DM Avatar: DruEl

PostAuthor: Cymbolism » Sat Jul 03, 2004 8:58 pm

Hehe, I have a script, it was developed by Sindol, it is to be used in the Green Tower if approved by Psycho, but he hasn't got the mod yet :wink:

void main()
{
// the user is identified
object oUser = GetLastUsedBy();

// reads the tag from the trapdoor
string sDoorTag = GetTag(OBJECT_SELF);

// find the destination, determined from the tag of the trapdoor
object oDest = GetWaypointByTag(sDoorTag + "_Destination");

// make sure the trapdoor is NOT locked or nothing will happen
if (!GetLocked(OBJECT_SELF))
{
if (GetIsOpen(OBJECT_SELF))// if open: jump user and close again
{
AssignCommand(oUser, JumpToObject(oDest,FALSE));
PlayAnimation(ANIMATION_PLACEABLE_CLOSE );
}
else // if closed: open
{
PlayAnimation(ANIMATION_PLACEABLE_OPEN );
}
}
}


put it on used and it links to a waypoint named <tag of object>_Destination

EDIT: you might notice it mentions a trapdoor. That's what I wanted if for originally, but have also used it for doors.
User avatar
Cymbolism
Scholar
 
Posts: 1437
Joined: Tue May 20, 2003 6:32 pm
Location: Bunbury, Western Australia, GMT+8

PostAuthor: Aloro » Sat Jul 03, 2004 10:22 pm

Even better: use the script I wrote called "door_onused". You'll need to create a waypoint for the destination (e.g. WP_MyDestination), then lay down the door. Add a string variable to the door called sDestination, and give as the value the Tag of the Waypoint. So in this case, you'd make a variable for the door called sDestination (string) = WP_MyDestination. Put the script "door_onused" in the door's OnUsed event handler.

I am 100% certain this script exists on the Le'Or server, and the Wilderness as well. I don't recall if I ever exported it for import to the other modules.

Dang, I really need to document all these utility scripts I've been writing for my own use. ;)

- Aloro
Aleksandr Solzhenitsyn wrote:The meaning of earthly existence lies, not as we have grown used to thinking, in prosperity, but in the development of the soul.
User avatar
Aloro
Team Member; Retired with Honors
 
Posts: 12810
Joined: Sat Dec 28, 2002 5:11 am
Location: Rainbow's End

PostAuthor: Nighthawk4 » Sun Jul 04, 2004 5:45 pm

Thanks guys, I used the one suggested by Cymbolism.

It works fine :lol:
Life is never as bad as you think it is, although that doesn't help at the time.

Orleron wrote:I think it's a fun idea if you can idiot-proof it. Problem is God always builds a better idiot. :P


Please visit:
Avlis UK, ACE Forum and SATF Forum

Image
User avatar
Nighthawk4
Eldest DM
Eldest DM
 
Posts: 23988
Images: 2
Joined: Fri Feb 07, 2003 8:32 pm
Location: The Home of the Bard of Avon
Timezone: GMT
DM Avatar: DruEl

PostAuthor: Sindol » Sun Jul 04, 2004 5:50 pm

Cymbolism better switch to the one Aloro uses though. It's no use importing another script that does the same as an existing script basically. That's like reinventing the wheel.

Would be nice if you could dump some of those utility scripts in the scripting library Aloro. Not that it takes much time to write such simple things, but it's still time better spent on something else. :wink:
So much fun,
yet so little time to enjoy it.
- Sindol
User avatar
Sindol
Team Member; Retired with Honors
 
Posts: 6487
Joined: Mon Jan 06, 2003 4:23 pm
Location: Nijmegen - Netherlands (GMT+1)

PostAuthor: Cymbolism » Sun Jul 04, 2004 5:53 pm

Yes, I have just been searching to see if it was posted in here already but can't find it.
Can you please post it up Aloro so I can test it in the Mod before submission? Cheers :D
I have three kids and no money.
Why can't I have no kids and three money? - Homer Simpson.
User avatar
Cymbolism
Scholar
 
Posts: 1437
Joined: Tue May 20, 2003 6:32 pm
Location: Bunbury, Western Australia, GMT+8

PostAuthor: Aloro » Sun Jul 04, 2004 7:36 pm

Cymbolism wrote:Yes, I have just been searching to see if it was posted in here already but can't find it.
Can you please post it up Aloro so I can test it in the Mod before submission? Cheers :D


Yep, sorry, I'll try to put a few of those in the library today. :)

- Aloro
Aleksandr Solzhenitsyn wrote:The meaning of earthly existence lies, not as we have grown used to thinking, in prosperity, but in the development of the soul.
User avatar
Aloro
Team Member; Retired with Honors
 
Posts: 12810
Joined: Sat Dec 28, 2002 5:11 am
Location: Rainbow's End

PostAuthor: Cymbolism » Sun Jul 04, 2004 7:42 pm

Thanks heaps - You tha man :D
I have three kids and no money.
Why can't I have no kids and three money? - Homer Simpson.
User avatar
Cymbolism
Scholar
 
Posts: 1437
Joined: Tue May 20, 2003 6:32 pm
Location: Bunbury, Western Australia, GMT+8


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot], Zandel