Frictional Games Forum (read-only)
How to open hub door with key in other map? (Solved) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: How to open hub door with key in other map? (Solved) (/thread-5935.html)



How to open hub door with key in other map? (Solved) - HumiliatioN - 12-28-2010

Yes it is possible? Because i have 3 maps in this next project and i have other map "Dungeon Key" and first map leads hub door What is the code can i use this Dungeon key with other map Hub door ?

Tell me how because my scripts arent working? Sad

Help me!
Nothing i Found it just take some time to think... I am totally noob scripter... Delete this thread!


RE: How to open hub door with key in other map? (Delete this thread SOLVED) - Equil - 01-01-2011

No, do not delete this thread. I am quite a "noob" scripter as well and also quite new to the idea of using scripts for multiple maps. Could you explain what you did? My custom story is also going to be across several maps and I will probably be using similar concepts as you, unfortunately I'm not really sure how scripts work across multiple maps, so any explanations can help.


RE: How to open hub door with key in other map? (Delete this thread SOLVED) - HumiliatioN - 01-01-2011

(01-01-2011, 04:49 AM)Equil Wrote: No, do not delete this thread. I am quite a "noob" scripter as well and also quite new to the idea of using scripts for multiple maps. Could you explain what you did? My custom story is also going to be across several maps and I will probably be using similar concepts as you, unfortunately I'm not really sure how scripts work across multiple maps, so any explanations can help.

Its easy.. Write your script there where are hub doors not where the hub doors go.. Like this

AddUseItemCallback("", "Dungeon Key <- This is other map key", "level_celler_2", "KeyOnDoor4", true);

void KeyOnDoor4(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("level_celler_2", false, false);
SetLevelDoorLocked(asEntity, false);
RemoveItem("Dungeon Key");
PlaySoundAtEntity("", "unlock_door.snt", "level_celler_2", 0.0f, false);
AddDebugMessage("Type anything you want here", false);
}

And if you have locked hub door and u need script to open with key..

SetLevelDoorLocked(asEntity, false); this is important to add..

Thats all its simple when you got it!


RE: How to open hub door with key in other map? (Solved) - Equil - 01-01-2011

Thank you. This is useful to me.

What I was trying to say though is instead of trying to delete your threads, maybe try turn them into help threads for newer scripters(such as myself) to save them searching through all the other threads when they were looking for your piece of code.

I dunno, it just seems wasteful and unproductive to delete threads like these to me. Undecided


RE: How to open hub door with key in other map? (Solved) - HumiliatioN - 01-01-2011

(01-01-2011, 04:27 PM)Equil Wrote: Thank you. This is useful to me.

What I was trying to say though is instead of trying to delete your threads, maybe try turn them into help threads for newer scripters(such as myself) to save them searching through all the other threads when they were looking for your piece of code.

I dunno, it just seems wasteful and unproductive to delete threads like these to me. Undecided

Okay i will keep that in my mind Smile