aceuniverse 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 3 
	Threads: 2 
	Joined: Aug 2012
	
 Reputation: 
0
		
	 | 
	
		
			
Script not working 
			 
			
				bear with me on this I'm brand new to scripting in Amensia 
 
I wanted a lever ("lever_1") to collide with the area ("lever_area"), then cause lever_1, lever_mount to disappear while the real lever is activated 
 
 
void onStart() 
{ 
	AddEntityCollideCallback("lever_1", "lever_area", "levervisible", false, 1); 
	 
} 
	 
void OnEnter(){  
} 
 
void OnLeave(){  
 
} 
	 
void levervisible(string &in Parent, string &in Child, int state) { 
 SetEntityActive("lever_1", false); 
 SetEntityActive("lever_mount", false); 
 SetEntityActive("actual_lever", true); 
}
			 
			
			
			
		 |  
	 
 | 
	| 08-10-2012, 12:46 AM  | 
	
		
	 | 
	
		
		Adny 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,766 
	Threads: 6 
	Joined: Mar 2012
	
 Reputation: 
173
		
	 | 
	
		
			
RE: Script not working 
			 
			
				the "onStart" needs to be spelled "OnStart", you also had a few bracket mistakes. Here ya go: 
 
 
void OnStart() 
{ 
AddEntityCollideCallback("lever_1", "lever_area", "levervisible", false, 1); 
} 
 
void OnEnter() 
{  
 
} 
 
void OnLeave() 
{  
 
} 
 
void levervisible(string &in asParent, string &in asChild, int alState) 
{  
SetEntityActive("lever_1", false); 
SetEntityActive("lever_mount", false); 
SetEntityActive("actual_lever", true); 
} 
 
 
Hope that helped.
			 
			
			
 
I rate it 3 memes. 
			
		 |  
	 
 | 
	| 08-10-2012, 12:50 AM  | 
	
		
	 | 
	
		
		aceuniverse 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 3 
	Threads: 2 
	Joined: Aug 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Script not working 
			 
			
				it worked perfectly! Thanks so much!
			 
			
			
			
		 |  
	 
 | 
	| 08-10-2012, 01:01 AM  | 
	
		
	 |