Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to open hub door with key in other map? (Solved)
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#1
How to open hub door with key in other map? (Solved)

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!

“Life is a game, play it”
(This post was last modified: 01-01-2011, 03:13 PM by HumiliatioN.)
12-28-2010, 10:06 PM
Find
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#2
RE: How to open hub door with key in other map? (Delete this thread SOLVED)

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
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#3
RE: How to open hub door with key in other map? (Delete this thread SOLVED)

(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!

“Life is a game, play it”
01-01-2011, 03:13 PM
Find
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#4
RE: How to open hub door with key in other map? (Solved)

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
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#5
RE: How to open hub door with key in other map? (Solved)

(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

“Life is a game, play it”
01-01-2011, 06:48 PM
Find




Users browsing this thread: 1 Guest(s)