idropfatkids 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 2 
	Threads: 1 
	Joined: Jan 2012
	
 Reputation: 
0
		
	 | 
	
		
			
How to put out the lanter. 
			 
			
				Hello! 
How can i put out lantern for some few seconds when i go in a Scriptarea. 
Not remove it, just put it of.
 
I tried this script, but nothing happend.
 
void OnStart() 
{ 
AddEntityCollideCallback("Player", "ScriptArea_1", "Disablelanter", true, 1); 
}
 
void Disablelanter(string &in asParent, string &in asChild, int alState) 
{ 
SetEntityActive("lantern", false); 
}
 
Ty for your answers in advance!    
			 
			
			
			
				
(This post was last modified: 01-06-2012, 07:41 PM by idropfatkids.)
 
				
			 
		 |  
	 
 | 
 
	| 01-06-2012, 07:40 PM  | 
	
		
	 | 
 
 
	
		
		SilentStriker 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 950 
	Threads: 26 
	Joined: Jul 2011
	
 Reputation: 
43
		
	 | 
	
		
			
RE: How to put out the lanter. 
			 
			
				 (01-06-2012, 07:40 PM)idropfatkids Wrote:  Hello! 
 
How can i put out lantern for some few seconds when i go in a Scriptarea. 
Not remove it, just put it of. 
 
I tried this script, but nothing happend. 
 
 
void OnStart() 
{ 
AddEntityCollideCallback("Player", "ScriptArea_1", "Disablelanter", true, 1); 
} 
 
 
void Disablelanter(string &in asParent, string &in asChild, int alState) 
{ 
SetEntityActive("lantern", false); 
} 
 
Ty for your answers in advance!   change SetEntityActive for  
SetLanternDisabled(true);
 
Just look around in and you'll find some neat stuff    http://wiki.frictionalgames.com/hpl2/amn...ons#player
			 
			
			
 
			
				
(This post was last modified: 01-06-2012, 07:51 PM by SilentStriker.)
 
				
			 
		 |  
	 
 | 
 
	| 01-06-2012, 07:50 PM  | 
	
		
	 | 
 
 
	
		
		idropfatkids 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 2 
	Threads: 1 
	Joined: Jan 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: How to put out the lanter. 
			 
			
				 (01-06-2012, 07:50 PM)SilentStriker Wrote:   (01-06-2012, 07:40 PM)idropfatkids Wrote:  Hello! 
 
How can i put out lantern for some few seconds when i go in a Scriptarea. 
Not remove it, just put it of. 
 
I tried this script, but nothing happend. 
 
 
void OnStart() 
{ 
AddEntityCollideCallback("Player", "ScriptArea_1", "Disablelanter", true, 1); 
} 
 
 
void Disablelanter(string &in asParent, string &in asChild, int alState) 
{ 
SetEntityActive("lantern", false); 
} 
 
Ty for your answers in advance!   change SetEntityActive for  
SetLanternDisabled(true); 
 
Just look around in and you'll find some neat stuff   http://wiki.frictionalgames.com/hpl2/amn...ons#player Thanks dude     
 (01-06-2012, 07:50 PM)SilentStriker Wrote:   (01-06-2012, 07:40 PM)idropfatkids Wrote:  Hello! 
 
How can i put out lantern for some few seconds when i go in a Scriptarea. 
Not remove it, just put it of. 
 
I tried this script, but nothing happend. 
 
 
void OnStart() 
{ 
AddEntityCollideCallback("Player", "ScriptArea_1", "Disablelanter", true, 1); 
} 
 
 
void Disablelanter(string &in asParent, string &in asChild, int alState) 
{ 
SetEntityActive("lantern", false); 
} 
 
Ty for your answers in advance!   change SetEntityActive for  
SetLanternDisabled(true); 
 
Just look around in and you'll find some neat stuff   http://wiki.frictionalgames.com/hpl2/amn...ons#player Nothing happend with the lantern it was still "burning" "/ Is it something wrong in the beginning of the script? 
			  
			
			
			
				
(This post was last modified: 01-06-2012, 09:20 PM by idropfatkids.)
 
				
			 
		 |  
	 
 | 
 
	| 01-06-2012, 09:12 PM  | 
	
		
	 | 
 
 
	
		
		Krymtel 
 
 
		
			Member 
			
			
			
 
			
	Posts: 105 
	Threads: 9 
	Joined: Oct 2011
	
 Reputation: 
3
		
	 | 
	
		
			
RE: How to put out the lanter. 
			 
			
				Try changing "lantern" into "hand_lantern"    
			 
			
			
 
			
		 |  
	 
 | 
 
	| 01-07-2012, 12:45 AM  | 
	
		
	 | 
 
 
	
		
		Dewi 
 
 
		
			Member 
			
			
			
 
			
	Posts: 57 
	Threads: 1 
	Joined: Dec 2011
	
 Reputation: 
1
		
	 | 
	
		
			
RE: How to put out the lanter. 
			 
			
				I honestly have no experience with scripting at all, but I noticed this line: 
void Disablelanter(string &in asParent, string &in asChild, int alState) 
 
says Disablelanter , shouldn't that be lantern? 
 
Ignore me if 'lanter' is something, though.. 
 
EDIT: Yeah, it probably is something since it says the same somewhere else. Nevermind!
			 
			
			
			
				
(This post was last modified: 01-07-2012, 03:28 AM by Dewi.)
 
				
			 
		 |  
	 
 | 
 
	| 01-07-2012, 03:27 AM  | 
	
		
	 | 
 
 
	
		
		Krymtel 
 
 
		
			Member 
			
			
			
 
			
	Posts: 105 
	Threads: 9 
	Joined: Oct 2011
	
 Reputation: 
3
		
	 | 
	
		
			
RE: How to put out the lanter. 
			 
			
				 (01-07-2012, 03:27 AM)Dewi Wrote:  I honestly have no experience with scripting at all, but I noticed this line: 
void Disablelanter(string &in asParent, string &in asChild, int alState) 
 
says Disablelanter , shouldn't that be lantern? 
 
Ignore me if 'lanter' is something, though.. 
 
EDIT: Yeah, it probably is something since it says the same somewhere else. Nevermind! If you need some help with anything, check out the  wiki 
			 
			
			
 
			
		 |  
	 
 | 
 
	| 01-07-2012, 08:43 AM  | 
	
		
	 | 
 
 
	
		
		MulleDK19 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 545 
	Threads: 21 
	Joined: Jun 2009
	
 Reputation: 
10
		
	 | 
	
		
			
RE: How to put out the lanter. 
			 
			
				 (01-06-2012, 07:40 PM)idropfatkids Wrote:  Hello! 
 
How can i put out lantern for some few seconds when i go in a Scriptarea. 
Not remove it, just put it of. 
 
I tried this script, but nothing happend. 
 
 
void OnStart() 
{ 
AddEntityCollideCallback("Player", "ScriptArea_1", "Disablelanter", true, 1); 
} 
 
 
void Disablelanter(string &in asParent, string &in asChild, int alState) 
{ 
SetEntityActive("lantern", false); 
} 
 
Ty for your answers in advance!   Use SetLanternActive(false, true); to turn it off, and SetLanternActive(true, true); to turn it on.
			  
			
			
 
			
		 |  
	 
 | 
 
	| 01-07-2012, 12:35 PM  | 
	
		
	 | 
 
 
	 
 |