Zypherzemus 
 
 
		
			Member 
			
			
			
 
			
	Posts: 94 
	Threads: 7 
	Joined: Jul 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Spencer Mansion / Need help with level door script 
			 
			
				I've got nothing man, I'm sorry.. maybe someone with more experience might know? 
 
and it's funny, it might be something so simple as a syntax error.. 
 
EDIT: wait... The "0.0f" needs to be an integer, not a float, just make it "0" 
Hopefully that's the cause.
			 
			
			
			
		 |  
	 
 | 
 
	| 07-16-2011, 10:11 PM  | 
	
		
	 | 
 
 
	
		
		AlexxShadenk777 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 40 
	Threads: 5 
	Joined: Jul 2011
	
 Reputation: 
1
		
	 | 
	
		
			
RE: Spencer Mansion / Need help with level door script 
			 
			
				Whenever there's a syntax error, the game crashes when loading the map, and prompts me about any and all errors in the script. Naturally this doesn't happen... it's quite frustrating cuz it forces me to just deal with it without being able to move on with this. I really want to invest into this project but it's stuff like this that just demotivates me most successfully. 
 
Anyway... Changed 0.0f to 0, and nothing changed. I tried once again changing the names of key and door to basically initials, hoping that shorter names would do anything, but no cigar. 
 
I ask again, is there any method I could try to script a key to a level door (like a script area to use the key on)? Simply dwelling on this issue doesn't seem to be helping. I mean, either it's inexplicably baffling or it's as simple as something missing, some step anyone hasn't thought of telling me that could be vital. Either something fixes this, or I need to try something else.
			 
			
			
			
		 |  
	 
 | 
 
	| 07-17-2011, 12:36 AM  | 
	
		
	 | 
 
 
	
		
		AlexxShadenk777 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 40 
	Threads: 5 
	Joined: Jul 2011
	
 Reputation: 
1
		
	 | 
	
		
			
RE: Spencer Mansion / Need help with level door script 
			 
			
				I can't put it off any longer. Here's the map with the script. Would be fantastic if anyone could fix this. The door is the second one on the right and I placed the key directly in front of it. 
http://www.mediafire.com/?67tqq6qvncai5un
			 
			
			
			
		 |  
	 
 | 
 
	| 07-17-2011, 11:56 PM  | 
	
		
	 | 
 
 
	
		
		plutomaniac 
 
 
		
			Super Moderator 
			
			
			
 
			
	Posts: 6,368 
	Threads: 45 
	Joined: May 2011
	
 Reputation: 
183
		
	 | 
	
		
			
RE: Spencer Mansion / Need help with level door script 
			 
			
				make a separate thread with your problem so that more people can see it. Its just an advise. Is it modern? You mentioned flashlite, that's why I asked.
			 
			
			
			
		 |  
	 
 | 
 
	| 07-18-2011, 01:32 AM  | 
	
		
	 | 
 
 
	
		
		Juby 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 290 
	Threads: 2 
	Joined: May 2011
	
 Reputation: 
5
		
	 | 
	
		
			
RE: Spencer Mansion / Need help with level door script 
			 
			
				I scanned the script (in the .rar uploaded to mediafire)and found and changed a couple things, I haven't tested it out though, but try this... 
void OnStart() 
{ 
    AddUseItemCallback("", "keys_1", "mhb_d", "UseMHBedroom", true); 
} 
 
void UseMHBedroom(string &in asItem, string &in asEntity) 
{ 
    SetLevelDoorLocked("mhb_d", false); 
    PlaySoundAtEntity("", "unlock_door.snt", "mhb_d", 0.1f, false); 
    RemoveItem(asItem); 
}
  
			 
			
			
 
Insanity. Static. 
			
				
(This post was last modified: 07-18-2011, 01:38 AM by Juby.)
 
				
			 
		 |  
	 
 | 
 
	| 07-18-2011, 01:37 AM  | 
	
		
	 | 
 
 
	
		
		AlexxShadenk777 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 40 
	Threads: 5 
	Joined: Jul 2011
	
 Reputation: 
1
		
	 | 
	
		
			
RE: Spencer Mansion / Need help with level door script 
			 
			
				@plutomaniac: 
No, I realized that the flashlight doesn't work in custom stories so I scrapped that idea for the sake of not creating needless problems... ahem. As for a dedicated thread it won't be necessary because... 
 
@Juby:  
I can't believe that actually worked. You just basically wrote "Use" in there somewhere, and it worked... This is perfect, thanks so much, I can finally move on with this thing! :D
			 
			
			
			
		 |  
	 
 | 
 
	| 07-18-2011, 01:58 AM  | 
	
		
	 | 
 
 
	
		
		Juby 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 290 
	Threads: 2 
	Joined: May 2011
	
 Reputation: 
5
		
	 | 
	
		
			
RE: Spencer Mansion / Need help with level door script 
			 
			
				 (07-18-2011, 01:58 AM)AlexxShadenk777 Wrote:  @Juby:  
I can't believe that actually worked. You just basically wrote "Use" in there somewhere, and it worked... This is perfect, thanks so much, I can finally move on with this thing!   
Yeah, but usually you misspell something here or there and it causes an issue with a function. If you ever need any help with something scripted related, feel free to ask me because I have experience with scripting   
			 
			
			
 
Insanity. Static. 
			
				
(This post was last modified: 10-29-2011, 03:17 AM by Juby.)
 
				
			 
		 |  
	 
 | 
 
	| 07-18-2011, 02:12 AM  | 
	
		
	 | 
 
 
	
		
		plutomaniac 
 
 
		
			Super Moderator 
			
			
			
 
			
	Posts: 6,368 
	Threads: 45 
	Joined: May 2011
	
 Reputation: 
183
		
	 | 
	
		
 | 
 
	| 07-18-2011, 02:24 AM  | 
	
		
	 | 
 
 
	
		
		AlexxShadenk777 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 40 
	Threads: 5 
	Joined: Jul 2011
	
 Reputation: 
1
		
	 | 
	
		
 | 
 
	| 07-20-2011, 05:37 PM  | 
	
		
	 | 
 
 
	 
 |