| 
		
	
		| fuytko   Junior Member
 
 Posts: 41
 Threads: 6
 Joined: Jun 2011
 Reputation: 
1
 | 
			| Transfering key to another map and then unlock door 
 
				Hello all ! 
Again me..
 
How I could script this :
 
I have item Key_2 in map 02_Study and I want this key to unlock door to the Libary in map 01_Entry_Hall .. Please,how I can do this?
 
It's really hard for me,I' am looking for some thread about this,I found one but I don't understand ..
 
Can somebody explain me in details ? Please    |  |  
	| 08-24-2011, 09:59 PM |  |  
	
		| Hades4545   Junior Member
 
 Posts: 4
 Threads: 1
 Joined: Aug 2011
 Reputation: 
0
 | 
			| RE: Transfering key to another map and then unlock door 
 
				This is only a guess, but maybe you can use the name of the key and such from the second map and then for the first map's script you can use the name of the key from the second map.
 Not sure if that will work, but its worth a shot. :o
 
 "Death: A fate worse than life. "--J. J. Furnas
 |  |  
	| 08-24-2011, 10:27 PM |  |  
	
		| fuytko   Junior Member
 
 Posts: 41
 Threads: 6
 Joined: Jun 2011
 Reputation: 
1
 | 
			| RE: Transfering key to another map and then unlock door 
 
				 (08-24-2011, 10:27 PM)Hades4545 Wrote:  This is only a guess, but maybe you can use the name of the key and such from the second map and then for the first map's script you can use the name of the key from the second map.
 Not sure if that will work, but its worth a shot. :o
 
I think that not will work
			 |  |  
	| 08-24-2011, 10:38 PM |  |  
	
		| JenniferOrange   Senior Member
 
 Posts: 424
 Threads: 43
 Joined: Jun 2011
 Reputation: 
33
 | 
			| RE: Transfering key to another map and then unlock door 
 
				Repeat the key unlock door script in both map1.hps and map2.hps.
			 
 Ba-da bing, ba-da boom.
 |  |  
	| 08-24-2011, 11:16 PM |  |  
	
		| Elven   Posting Freak
 
 Posts: 862
 Threads: 37
 Joined: Aug 2011
 Reputation: 
26
 | 
			| RE: Transfering key to another map and then unlock door 
 
				As I told you already. if you transfer maps, you will bring all items with you. You should ask instead then, how can you open locked doors with key ^^.
			 
 
				
(This post was last modified: 08-24-2011, 11:26 PM by Elven.)
 |  |  
	| 08-24-2011, 11:25 PM |  |  
	
		| fuytko   Junior Member
 
 Posts: 41
 Threads: 6
 Joined: Jun 2011
 Reputation: 
1
 | 
			| RE: Transfering key to another map and then unlock door 
 
				 (08-24-2011, 11:16 PM)JenniferOrange Wrote:  Repeat the key unlock door script in both map1.hps and map2.hps. 
it will work?
			 |  |  
	| 08-25-2011, 12:02 AM |  |  
	
		| JenniferOrange   Senior Member
 
 Posts: 424
 Threads: 43
 Joined: Jun 2011
 Reputation: 
33
 | 
			| RE: Transfering key to another map and then unlock door 
 
				Already have it tested, yes, it will work :] If it doesn't then my sincere apologies, i tested it on level doors and it worked for me though.
 
 Ba-da bing, ba-da boom.
 
				
(This post was last modified: 08-25-2011, 02:07 AM by JenniferOrange.)
 |  |  
	| 08-25-2011, 02:06 AM |  |  
	
		| fuytko   Junior Member
 
 Posts: 41
 Threads: 6
 Joined: Jun 2011
 Reputation: 
1
 | 
			| RE: Transfering key to another map and then unlock door 
 
				 (08-25-2011, 02:06 AM)JenniferOrange Wrote:  Already have it tested, yes, it will work :]If it doesn't then my sincere apologies, i tested it on level doors and it worked for me though.
 
It doesn't work..
 
This script you thinks?
 void OnStart()
 {
 AddUseItemCallback("", "Key_2", "level_celler_1", "OnPickup", true);
 }
 
 void OnPickup(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("level_celler_1", false, true);
 PlaySoundAtEntity("", "unlock_door", "level_celler_1", 0, false);
 RemoveItem("Key_2");
 }
I copy this script and put it in 01_EntryHall.hps and in 02_Study.hps .. But If I want go through level door to Study it shows message that this function already exists with same parameters ..
			 |  |  
	| 08-25-2011, 06:33 AM |  |  
	
		| JenniferOrange   Senior Member
 
 Posts: 424
 Threads: 43
 Joined: Jun 2011
 Reputation: 
33
 | 
			| RE: Transfering key to another map and then unlock door 
 
				Try this instead:  
Put that in the first map's .hps! In the second map's .hps, put this:
 Ba-da bing, ba-da boom.
 
				
(This post was last modified: 08-25-2011, 10:48 PM by JenniferOrange.)
 |  |  
	| 08-25-2011, 10:46 PM |  |  
	
		| Kyle   Posting Freak
 
 Posts: 911
 Threads: 36
 Joined: Sep 2010
 Reputation: 
7
 | 
			| RE: Transfering key to another map and then unlock door 
 
				Please... Use the search bar first... -_-
			 
 |  |  
	| 08-25-2011, 11:25 PM |  |  |