Author Topic: Locked doors  (Read 1150 times)

Offline bravedogbfg

  • Full Member
  • ***
  • Posts: 212
Locked doors
« on: November 21, 2014, 01:34:52 PM »
How do you lock a door after an event?

I am putting together the Tilverton area in Curse.  When the town alarm sounds, most of the doors in the town lock.

I would rather not have an event check once the party steps in and then kick them out.  I just want the door to be locked with a message.

Thanks!

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9858
Re: Locked doors
« Reply #1 on: November 21, 2014, 03:34:05 PM »
Two ways come to mind...
1) use two levels, one wiht locked doors and one without and use a queest to track which level the party should go to
2) use a script with $SetBlockage for each door http://manikus.reonis.com/Help/SASpecialAbilitiesScripts.html

Offline bravedogbfg

  • Full Member
  • ***
  • Posts: 212
Re: Locked doors
« Reply #2 on: November 21, 2014, 05:46:52 PM »
Two ways come to mind...
1) use two levels, one wiht locked doors and one without and use a queest to track which level the party should go to
2) use a script with $SetBlockage for each door http://manikus.reonis.com/Help/SASpecialAbilitiesScripts.html

I was also thinking about #1.  I think I will go that route, especially because it is a one time changeover.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2235
Re: Locked doors
« Reply #3 on: November 21, 2014, 05:57:53 PM »
If this is a common problem, perhaps a small modification
to the "UnlockDoorSpells" hook could provide an easy
answer.  The hook could examine a global variable and
declare the door to be either open or locked.  Solution #1
only works reasonably if there is a single set of doors that
all respond to the same 'key'.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2183
    • Nol Drek's Web Site
Re: Locked doors
« Reply #4 on: November 21, 2014, 08:42:28 PM »
How do you lock a door after an event?

I am putting together the Tilverton area in Curse.  When the town alarm sounds, most of the doors in the town lock.

Give the party a key that works on all the doors. When the alarm sounds, take the key away.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline bravedogbfg

  • Full Member
  • ***
  • Posts: 212
Re: Locked doors
« Reply #5 on: November 21, 2014, 08:45:33 PM »
How do you lock a door after an event?

I am putting together the Tilverton area in Curse.  When the town alarm sounds, most of the doors in the town lock.

Give the party a key that works on all the doors. When the alarm sounds, take the key away.

I messed around with keys a bit, but couldn't figure out how to associate the key with the doorway and put up a message when they didn't have the key.  This would be a good solution if I could figure out how to get it to work. thanks!

BTW - if nothing else, this project is forcing me to use all sorts of different events and get the ins and outs of DC

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2183
    • Nol Drek's Web Site
Re: Locked doors
« Reply #6 on: November 21, 2014, 09:03:36 PM »
Go to the Global menu and select Iems, Keys, Quests.

Click on Add, create a new Special Key, and uncheck the box "can be dropped by party".

This will be Key 1. You can have up to 8 Keys.

In the square outside the door, make a text event that informs the player that the door is locked. You can have the event only fire if the party does NOT have a Special Key.

The downside is that Special Keys show up in the player's inventory. They will know that they have a key called "New to Tilverton". You are also limited to only 8 special keys per design.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2235
Re: Locked doors
« Reply #7 on: November 21, 2014, 09:19:27 PM »
As a total novice at actually creating a design, here
is what I would try first:

Outside each such door plant an event that locks
or unlocks the door and provides the appropriate text.

Offline bravedogbfg

  • Full Member
  • ***
  • Posts: 212
Re: Locked doors
« Reply #8 on: November 22, 2014, 10:07:51 AM »
Is there a way to only get the text event to fire if they try to go through the door?  Without telling them the door is locked every time they walk by a locked door.  And without letting them through to the next square and then pushing them back.

Oh, and play a locked door sound too would be cool.

Offline bravedogbfg

  • Full Member
  • ***
  • Posts: 212
Re: Locked doors
« Reply #9 on: November 22, 2014, 10:09:07 AM »
As a total novice at actually creating a design, here
is what I would try first:

Outside each such door plant an event that locks
or unlocks the door and provides the appropriate text.

How do you do it, is it the tutorial that Manikus created on changing walls?

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2183
    • Nol Drek's Web Site
Re: Locked doors
« Reply #10 on: November 22, 2014, 11:16:47 AM »
Is there a way to only get the text event to fire if they try to go through the door?

Make the door open, not locked. On the square just inside the door, make a Transfer Module event. Have the Transfer Module event trigger when the party does NOT have a Special Item. The Transfer Module event should teleport the party to just outside the door, facing towards the door, and it should activate when the party attempts entry. The "text displayed after transfer" could say "this door is locked".

This method uses a Special Item instead of a Special Key, so you can have 268,000,000 doors like this one in a design.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2235
Re: Locked doors
« Reply #11 on: November 22, 2014, 11:25:45 AM »
The following was created before I saw Nol Drek's
response.  His method is likely better.  He has actually
done these things.

Quote
How do you do it, is it the tutorial that Manikus created on changing walls?

Again, I am a total novice.  The method of changing walls has
been modified in the last few years.  But the basic idea has
stayed the same.  So starting with that tutorial and the link
posted above should get you close:

http://manikus.reonis.com/Help/SASpecialAbilitiesScripts.html

The event that locks the doors could lock all the doors.  It would
need a list of doors to lock.  The only disadvantage in my mind is that
as you add/delete/move doors, you have to remember to update
the list.  That is why I suggested an event outside each door.
It would be easier for me to remember to move the event along
with the door.  The list is more efficient if you are a bit more
organized than I am.

As far as the player's experience....the result is exactly the same
as if you had specified in the editor that the door be locked or
unlocked.  I don't know what happens when the player tries to
enter a locked door.  I'm sure that someone else can tell us.

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1953
Re: Locked doors
« Reply #12 on: November 22, 2014, 09:10:17 PM »
Is there a way to only get the text event to fire if they try to go through the door?

Make the door open, not locked. On the square just inside the door, make a Transfer Module event. Have the Transfer Module event trigger when the party does NOT have a Special Item. The Transfer Module event should teleport the party to just outside the door, facing towards the door, and it should activate when the party attempts entry. The "text displayed after transfer" could say "this door is locked".

This method uses a Special Item instead of a Special Key, so you can have 268,000,000 doors like this one in a design.

This is how I would do it (and have done it) too. Note that you can use a quest instead of a special item and it will not show up in characters' inventories.