| 
		
	
		| Straxedix   Senior Member
 
 Posts: 426
 Threads: 52
 Joined: Mar 2014
 Reputation: 
5
 | 
			|  Lights ^.^ (Fast answer :D) 
 
				Hii ^.^
 i need help i wanna when player walk in area to all light's turn off so it's like this ???
 
 AddEntityColideCallback("Player", "area2", "lightsdown", true, 1);
 
 
 void SetLampLit("Light1", false, false);
 
 
 
 
 ----------------------------------------------------------------------
 
 void SetLampLit(string& asName, bool abLit, bool abEffects);
 (Un)lits a lamp.
 
 asName - Name of the lamp
 abLit - Set true if you want the lamp to be lit, set to false if you want the lamp to be unlit
 abEffects - If you want to have the lamp fade in/out when it gets (un)lit
 
 
				
(This post was last modified: 03-22-2014, 01:17 PM by Straxedix.)
 |  |  
	| 03-22-2014, 01:16 PM |  |  
	
		| PutraenusAlivius   Posting Freak
 
 Posts: 4,713
 Threads: 75
 Joined: Dec 2012
 Reputation: 
119
 | 
			| RE: Lights ^.^ (Fast answer :D) 
 
				Yes, but without the void. And it should be in a callback function.
			 
 "Veni, vidi, vici.""I came, I saw, I conquered."
 |  |  
	| 03-22-2014, 01:17 PM |  |  
	
		| Straxedix   Senior Member
 
 Posts: 426
 Threads: 52
 Joined: Mar 2014
 Reputation: 
5
 | 
			| RE: Lights ^.^ (Fast answer :D) 
 
				SomethingRidiculous appears    
Thanks man !    
 
SO i set like this
 
AddEntityColideCallback("Player", "LightScript", "lightsdown", true, 1);
 
lightsdown("Torch1", false, false);
 
and it not works ?
 
and how to make when enter 1 area to turn off more then 1 light anyone know ?
 
 
and it say's expected identifer
			
 
				
(This post was last modified: 03-22-2014, 01:42 PM by Straxedix.)
 |  |  
	| 03-22-2014, 01:20 PM |  |  
	
		| DnALANGE  Banned
 
 Posts: 1,549
 Threads: 73
 Joined: Jan 2012
 | 
			| RE: Lights ^.^ (Fast answer :D) 
 
				No,You have to do it like this :
 
 AddEntityColideCallback("Player", "LightScript", "lightsdown", true, 1);
 
 void lightsdown(string &in asParent, string &in asChild, int alState)
 {
 SetLampLit("Torch1", false, false);
 }
 
 Try that, it should do what you want.
 ---
 You do NOT have to say FAST ANWSER...
 We Always help asap as we can, don't worry about that!
 
				
(This post was last modified: 03-22-2014, 01:59 PM by DnALANGE.)
 |  |  
	| 03-22-2014, 01:57 PM |  |  
	
		| Straxedix   Senior Member
 
 Posts: 426
 Threads: 52
 Joined: Mar 2014
 Reputation: 
5
 | 
			| RE: Lights ^.^ (Fast answer :D) 
 
				yeah and how to make turn off many of them    ?
			
 |  |  
	| 03-22-2014, 01:58 PM |  |  
	
		| DnALANGE  Banned
 
 Posts: 1,549
 Threads: 73
 Joined: Jan 2012
 | 
			| RE: Lights ^.^ (Fast answer :D) 
 
				I guess you mean this :
 void lightsdown(string &in asParent, string &in asChild, int alState)
 {
 SetLampLit("Torch1", false, false);
 SetLampLit("Torch2", false, false);
 SetLampLit("Torch3", false, false);
 SetLampLit("Torch4", false, false);
 SetLampLit("Torch5", false, false);
 SetLampLit("Torch6", false, false);
 SetLampLit("Torch7", false, false);
 }
 
 And so on, just add as how many you need\prefer.
 
				
(This post was last modified: 03-22-2014, 02:00 PM by DnALANGE.)
 |  |  
	| 03-22-2014, 02:00 PM |  |  
	
		| Straxedix   Senior Member
 
 Posts: 426
 Threads: 52
 Joined: Mar 2014
 Reputation: 
5
 | 
			| RE: Lights ^.^ (Fast answer :D) 
 
				yeah it is thanks   
 |  |  
	| 03-22-2014, 02:22 PM |  |  
	
		| DnALANGE  Banned
 
 Posts: 1,549
 Threads: 73
 Joined: Jan 2012
 | 
			| RE: Lights ^.^ (Fast answer :D) 
 
				Just a hint for you :SetLampLit("Torch7", false, false);
 
 The second false is for FADING the lights.
 It gives a bit more of a realistic look.
 
 so   false,false = off inmidiatly
 and false,true = fade the light to off.
 
				
(This post was last modified: 03-22-2014, 02:36 PM by DnALANGE.)
 |  |  
	| 03-22-2014, 02:31 PM |  |  
	
		| Straxedix   Senior Member
 
 Posts: 426
 Threads: 52
 Joined: Mar 2014
 Reputation: 
5
 | 
			| RE: Lights ^.^ (Fast answer :D) 
 
				I know that   
And i need just 6 so ^.^
 
And pls reply to my next thread i made in a min
			
 |  |  
	| 03-22-2014, 03:12 PM |  |  
	
		| PutraenusAlivius   Posting Freak
 
 Posts: 4,713
 Threads: 75
 Joined: Dec 2012
 Reputation: 
119
 | 
			| RE: Lights ^.^ (Fast answer :D) 
 
				 (03-22-2014, 02:00 PM)DnALANGE Wrote:  I guess you mean this :
 void lightsdown(string &in asParent, string &in asChild, int alState)
 {
 SetLampLit("Torch1", false, false);
 SetLampLit("Torch2", false, false);
 SetLampLit("Torch3", false, false);
 SetLampLit("Torch4", false, false);
 SetLampLit("Torch5", false, false);
 SetLampLit("Torch6", false, false);
 SetLampLit("Torch7", false, false);
 }
 
 And so on, just add as how many you need\prefer.
 
It's easier to do name it (in the Level Editor) Torch_1, Torch_2 and so on so that instead of 6 same function you could just write:
 SetLampLit("Torch_*", false, true); 
It's easier, cleaner and more efficient that way.
			 
 "Veni, vidi, vici.""I came, I saw, I conquered."
 |  |  
	| 03-23-2014, 01:35 AM |  |  |