| 
		
	
		| waqas12346   Senior Member
 
 Posts: 352
 Threads: 38
 Joined: Nov 2010
 Reputation: 
1
 | 
			|  It's still locked, Even I used a key...[SOLVED] 
 
				Ok, I am standing infront of the door, I have a key, I used a key now, Now I heard a Unlocked door sound, Checked my inventory and key is not there anymore because I used it, I'm about to open the door. Now I heard a Locked sound, WHY THE DOOR IS STILL LOCKED??? I even used a key on it!!! What is wrong with this script?    void OnStart(){
 AddUseItemCallback("", "Fluffy_Key", "Fluffy_Door", "KeyOnDoor", true);
 }
 
 void KeyOnDoor(string &in asItem, string &in asEntity)
 {
 SetSwingDoorLocked("Fluffy_Door", false, true);
 PlaySoundAtEntity("", "unlock_door.snt", "Fluffy_Door", 0.0f, true);
 }
 
 void OnEnter()
 {
 }
 
 void OnLeave()
 {
 }
				
(This post was last modified: 08-30-2011, 05:34 AM by waqas12346.)
 |  |  
	| 08-29-2011, 10:25 PM |  |  
	
		| Rapture   Posting Freak
 
 Posts: 1,078
 Threads: 79
 Joined: May 2011
 Reputation: 
30
 | 
			| RE: It's still locked, Even I used a key... 
 
				Is the door a swing door or a level door? That makes a difference.
 Swing door = Opens & closes
 Level Door = Does not open, only goes to another map.
 
				
(This post was last modified: 08-29-2011, 10:57 PM by Rapture.)
 |  |  
	| 08-29-2011, 10:57 PM |  |  
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: It's still locked, Even I used a key... 
 
				Did you position the door properly? Sometimes there are conflicts between the door and the door frame that prevents the door from opening.
			 
 |  |  
	| 08-29-2011, 11:01 PM |  |  
	
		| waqas12346   Senior Member
 
 Posts: 352
 Threads: 38
 Joined: Nov 2010
 Reputation: 
1
 | 
			| RE: It's still locked, Even I used a key... 
 
				 (08-29-2011, 10:57 PM)Rapture Wrote:  Is the door a swing door or a level door? That makes a difference.
 Swing door = Opens & closes
 Level Door = Does not open, only goes to another map.
 
It is a Swing Door! (Mansion door)
  (08-29-2011, 11:01 PM)Your Computer Wrote:  Did you position the door properly? Sometimes there are conflicts between the door and the door frame that prevents the door from opening. 
Yes, The position is correct.... Is there anything wrong with the script?   
				
(This post was last modified: 08-29-2011, 11:30 PM by waqas12346.)
 |  |  
	| 08-29-2011, 11:30 PM |  |  
	
		| Elven   Posting Freak
 
 Posts: 862
 Threads: 37
 Joined: Aug 2011
 Reputation: 
26
 | 
			| RE: It's still locked, Even I used a key... 
 
				Make sure that in map editor name is EXACTLY same as in script (capital letters and lowercases, etc)
			 
 |  |  
	| 08-29-2011, 11:43 PM |  |  
	
		| DRedshot   Senior Member
 
 Posts: 374
 Threads: 23
 Joined: Jun 2011
 Reputation: 
11
 | 
			| RE: It's still locked, Even I used a key... 
 
				There is nothing wrong with the script, otherwise "PlaySoundAtEntity" wouldn't even run.the only possible error is in "SetSwingDoorLocked("Fluffy_Door", false, true);"
 Try Deleting the .map_CACHE file from custom_stories/mystory/maps/
 
 
 
 
				
(This post was last modified: 08-30-2011, 12:00 AM by DRedshot.)
 |  |  
	| 08-29-2011, 11:58 PM |  |  
	
		| waqas12346   Senior Member
 
 Posts: 352
 Threads: 38
 Joined: Nov 2010
 Reputation: 
1
 | 
			| RE: It's still locked, Even I used a key... 
 
				 (08-29-2011, 11:58 PM)DRedshot Wrote:  There is nothing wrong with the script, otherwise "PlaySoundAtEntity" wouldn't even run.the only possible error is in "SetSwingDoorLocked("Fluffy_Door", false, true);"
 Try Deleting the .map_CACHE file from custom_stories/mystory/maps/
 
Is there something wrong with the word "Fluffy"?     
  (08-29-2011, 11:43 PM)Elven Wrote:  Make sure that in map editor name is EXACTLY same as in script (capital letters and lowercases, etc) 
Everything is correct, Guess script hate Word "Fluffy"!    
				
(This post was last modified: 08-30-2011, 12:08 AM by waqas12346.)
 |  |  
	| 08-30-2011, 12:07 AM |  |  
	
		| Elven   Posting Freak
 
 Posts: 862
 Threads: 37
 Joined: Aug 2011
 Reputation: 
26
 | 
			| RE: It's still locked, Even I used a key... 
 
				Hmm, as I said try to put exact one just in case into both. Maybe remove upper cases from both names and make it just fluffy_door or fluffydoor :/?
			 
 |  |  
	| 08-30-2011, 12:10 AM |  |  
	
		| waqas12346   Senior Member
 
 Posts: 352
 Threads: 38
 Joined: Nov 2010
 Reputation: 
1
 | 
			| RE: It's still locked, Even I used a key... 
 
				 (08-30-2011, 12:10 AM)Elven Wrote:  Hmm, as I said try to put exact one just in case into both. Maybe remove upper cases from both names and make it just fluffy_door or fluffydoor :/? 
I changed it to "Monster_Door" and it works, Guess Amnesia or it's scripting function doesn't allow Word "Fluffy"?    |  |  
	| 08-30-2011, 05:34 AM |  |  
	
		| Elven   Posting Freak
 
 Posts: 862
 Threads: 37
 Joined: Aug 2011
 Reputation: 
26
 | 
			| RE: It's still locked, Even I used a key...[SOLVED] 
 
				hmm, he sometimes does bugs like those
			 
 |  |  
	| 08-30-2011, 10:33 AM |  |  |