Frictional Games Forum (read-only)

Full Version: How to open hub door with key in other map? (Solved)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
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.
(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!
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
(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