Jump to content

Photo

Door-specific keys


  • Please log in to reply
7 replies to this topic

#1 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 02 May 2018 - 06:27 AM

Is there a way to make keys that are specific to a particular door?

Each key would probably be its own item.



#2 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 02 May 2018 - 07:53 AM

Is there a way to make keys that are specific to a particular door?

Each key would probably be its own item.

If you are interested in a scripted solution i can post it here....



#3 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 02 May 2018 - 08:01 AM

If you aren't interested in a scripted solution, you can always play around with Dmaps identical to the one you're on except for the level numbers, and level-specific keys. Don't expect visual consistency though, as there really won't be anything to let the player know that you do indeed have this specific key. It'll be little more than a key quantity that arbitrarily goes from 0 to 1 depending on where in the location you are.

It's a very messy solution, but it works. ... Except for map data. You won't get the map data on those identical alternate Dmaps. :P
  • judasrising likes this

#4 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 02 May 2018 - 01:24 PM

Yeah, I meant a scripted solution. I'm not playing around with Dmaps. Doing that for boss room music pre-music.zh was bad enough.

 

EDIT: For my purposes, what may be possible is to make a lock block which only allows a key of a specific power/level to use it (maybe a script 2 combo?). That would be enough, since there's only one door that needs a specific key.


Edited by klop422, 02 May 2018 - 07:12 PM.


#5 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 03 May 2018 - 03:21 AM

By the way, I've worked around it without scripts. Would still be cool to see this, but I don't need it.



#6 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 03 May 2018 - 04:02 AM

By the way, I've worked around it without scripts. Would still be cool to see this, but I don't need it.

I use this little script ...

 

------------------------------------------------------------------------

// D0 = Item id
 
 
ffc script ItemToSecret{
 void run(int m) {
  while(!Link->Item[m] || Screen->State[ST_SECRET]==true) Waitframe();
  Screen->TriggerSecrets();
  Screen->State[ST_SECRET]=true;
 }
}
--------------------------------------------------------------------------------------------------------
D0 = is the item id to check


#7 klop422

klop422

    Guess I'm full of monsters and treasure

  • Members
  • Real Name:Not George
  • Location:Planet Earth

Posted 03 May 2018 - 05:07 AM

Not sure if this script works for what I want, unless you tell the room to change a fake lockblock into a real one when you bring the right key into the room.

Problem is, that approach would possibly allow you to use any key in that room as long as you had the right key at all. Not an issue within the room itself, but in a dungeon, less useful.



#8 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 03 May 2018 - 05:20 AM

Not sure if this script works for what I want, unless you tell the room to change a fake lockblock into a real one when you bring the right key into the room.

Problem is, that approach would possibly allow you to use any key in that room as long as you had the right key at all. Not an issue within the room itself, but in a dungeon, less useful.

hm i use that small script for allmost what you wanted since it sets the screen state only if you have and specified item .




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users