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
#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


Messages In This Thread
RE: How to open hub door with key in other map? (Delete this thread SOLVED) - by HumiliatioN - 01-01-2011, 03:13 PM



Users browsing this thread: 1 Guest(s)