Author Topic: placeable door script  (Read 432 times)

Legacy_NWN_baba yaga

  • Hero Member
  • *****
  • Posts: 1944
  • Karma: +0/-0
placeable door script
« on: February 21, 2014, 09:15:52 pm »


               Heya,

I can only use placeable doors in my module... so my question is. Is there a good advanced script that kinda simulate the regular door functions? I mean with lock pick and and and... maybe trough a conversation ?

Whatever hint or link you can give me, all is good for me '<img'>

thanks in advance

EDIT: i am really not good in scripting so please keep this in mind, thanks!
               
               

               


                     Modifié par NWN_baba yaga, 21 février 2014 - 09:17 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
placeable door script
« Reply #1 on: February 21, 2014, 09:24:42 pm »


               interesting request. i don't think i have such a set up, but i could take a look at what I've got. i'll subscribe to this thread to remind me later to post what i have.
               
               

               
            

Legacy_NWN_baba yaga

  • Hero Member
  • *****
  • Posts: 1944
  • Karma: +0/-0
placeable door script
« Reply #2 on: February 21, 2014, 09:40:11 pm »


               Thing is, the entrances of the buildings are kinda here and there, and you can move on some rooftops and balconys etc. so with the regular door tileset system i would get mad. And placeables and invisible objects with conversations are much more flexible.
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
placeable door script
« Reply #3 on: February 21, 2014, 10:01:45 pm »


               You could easily script a conversation that has a menu of options for what to do when the player interacts with the door. I'm sure the built-in script wizard or Lilac Souls script generator can do most of the coding for you. What are you looking at for options in the conversation? I would assume...

1. Bash door
2. Lock door.
3. Unlock door (if they have the key)
4. Pick lock.
5. Open door.
6. Close door.
7. Use door (transition).
               
               

               


                     Modifié par Pstemarie, 21 février 2014 - 10:04 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
placeable door script
« Reply #4 on: February 21, 2014, 10:15:14 pm »


               since it is a placeable most of the events and functionality you need are already there. you probably don't even need a conversation.

I'm not knocking that approach, rather I want to let you know that you don't necessarily need a conversation of options to achieve your goals. One advantage of using a conversation with a list of options is that it might be easy to set up with the script wizard.
               
               

               
            

Legacy_NWN_baba yaga

  • Hero Member
  • *****
  • Posts: 1944
  • Karma: +0/-0
placeable door script
« Reply #5 on: February 21, 2014, 10:25:31 pm »


               Thanks. That sounds all very good. I really need to start some gameplay things... '<img'>

Well a conversation would be cool. I like that. And options i think i need the options you said Pstemarie. With the activate animation i can do that open/ close. Destroyed is clear/ thats bashing.
Also easy i guess. Lock door and adding planks to it (then switch to another placable door that is barred) is cool for a zombie attack somewhere in an abandoned barn in the outskirts. And pick lock is the most important one. I´m not trying to simulate everything that nwn offers, but that is a great thing for city missions.
               
               

               


                     Modifié par NWN_baba yaga, 21 février 2014 - 10:26 .
                     
                  


            

Legacy_TheOneBlackRider

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
placeable door script
« Reply #6 on: February 22, 2014, 03:39:29 pm »


               The NWN secret placeable door is kind of usable as a normal door (except is does not show the bluish shimmer).
OnUsed it has x0_o2_use_wdoor
It uses #include "x0_i0_secret"
There is a wrong information in x0_o2_use_wdoor: The TAG of the destination waypoint must be DST__<tag of door>, NOT LOC__<tag of door>. You can sse it in x0_i0_secret.

But this only handles the area transition, not the other options. But maybe it's a point to start with.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
placeable door script
« Reply #7 on: February 22, 2014, 03:57:34 pm »


               I have a script for a doors that enables all the features that Pstemarie named, but its full of custom stuff I would have to pull off from it and if I dont do that I think it will be hardly unusable for you.

But to give other scripters lurking here an idea to help you, there is code.

Except that, it seems that the doors you are talking about are those from CEP which works differently than the standard placeable doors and requires some extra scripting that CEP provides so the solution from the vanilla doors neither my script is useable for you.
               
               

               


                     Modifié par ShaDoOoW, 22 février 2014 - 03:58 .
                     
                  


            

Legacy_NWN_baba yaga

  • Hero Member
  • *****
  • Posts: 1944
  • Karma: +0/-0
placeable door script
« Reply #8 on: February 22, 2014, 07:55:41 pm »


               Thank you thank you. I will try to test the door scripts you posted ShaDoOoW and will look into the secret placebale door script as well TOBR.

The door is the only thing that gives me a little headache. Everything else is already done more or less by all the people who were kind enough to share their work. So when i have something new to add or ask i will post then. Till then, thanks again so far!

And it doesnt needs to be perfect right from the start. Like i said, the whole adventure i´m planing is not about a virtual reality... many doors are just closed, or you can lockpick and enter and thats it. some doors are not even animated, broken planks that function like a door are just how they are modeled...nothing fancy. 

Only a door that is important for the mainquest would be something that has to stand out, but i´m far away from even connecting all the dots of my prologue. I have to design the whole material too... '<img'>
               
               

               


                     Modifié par NWN_baba yaga, 22 février 2014 - 08:02 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
placeable door script
« Reply #9 on: March 03, 2014, 11:04:37 pm »


               

how is this going for you, Baba?