Henriksen 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 308 
	Threads: 71 
	Joined: Dec 2010
	
 Reputation: 
2
		
	 | 
	
		
			
SetEntityActive("shelf_high01_1", false); Doesnt work 
			 
			
				Hi, Im trying to get it work so that when the level touches a area it triggers a function. The problem however is that when I start the map even though i checked of the "Active" thing it still is there and the script doesnt work either. 
This is my script: 
 
//////////////////////////// 
// Run first time starting map 
void OnStart() 
{ 
AddEntityCollideCallback("lever_small01_1", "Sesame", "Open", true, 1); 
} 
 
void Open(string &in asParent, string &in asChild, int alState) 
{ 
SetEntityActive("shelf_high01_1", false); 
SetEntityActive("shelf_high01_6", true); 
} 
 
//////////////////////////// 
// Run when entering map 
void OnEnter() 
{	 
	 
} 
 
//////////////////////////// 
// Run when leaving map 
void OnLeave() 
{ 
 
}
			 
			
			
			
		 |  
	 
 | 
	| 05-24-2011, 09:50 PM  | 
	
		
	 | 
	
		
		Tanshaydar 
 
 
		
			From Beyond 
			
			
			
 
			
	Posts: 3,085 
	Threads: 17 
	Joined: Mar 2009
	
 Reputation: 
67
		
	 | 
	
		
			
RE: SetEntityActive("shelf_high01_1", false); Doesnt work 
			 
			
				StaticProp type of entities cannot be de-activated. You should change the type via model editor or use another entity.
			 
			
			
 
			
		 |  
	 
 | 
	| 05-24-2011, 09:59 PM  | 
	
		
	 | 
	
		
		Simpanra 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 314 
	Threads: 28 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: SetEntityActive("shelf_high01_1", false); Doesnt work 
			 
			
				there is another entity that looks the same =) i cant remember what category it is under, but it is an entity called secret_shelf  ^_^
			 
			
			
			
		 |  
	 
 | 
	| 05-24-2011, 10:05 PM  | 
	
		
	 | 
	
		
		Kyle 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 911 
	Threads: 36 
	Joined: Sep 2010
	
 Reputation: 
7
		
	 | 
	
		
			
RE: SetEntityActive("shelf_high01_1", false); Doesnt work 
			 
			
				 (05-24-2011, 10:05 PM)Simpanra Wrote:  there is another entity that looks the same =) i cant remember what category it is under, but it is an entity called secret_shelf  ^_^ 
I'm pretty sure it's under Entities --> Gameplay
			  
			
			
 
			
		 |  
	 
 | 
	| 05-25-2011, 11:39 AM  | 
	
		
	 | 
	
		
		Simpanra 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 314 
	Threads: 28 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: SetEntityActive("shelf_high01_1", false); Doesnt work 
			 
			
				Yeah that sounds right ^_^
			 
			
			
			
		 |  
	 
 | 
	| 05-25-2011, 12:00 PM  | 
	
		
	 | 
	
		
		ferryadams10 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 288 
	Threads: 40 
	Joined: Apr 2011
	
 Reputation: 
19
		
	 | 
	
		
			
RE: SetEntityActive("shelf_high01_1", false); Doesnt work 
			 
			
				You are all talking about a secret shelf but a secret shelf u open on a different way. 
He doesn't wants to open a secret shelf. He just wants to make it look like it did open by disactivating the one and activating the let's say "open" one. 
Teddifisk, add me on msn I've learned allot about scripting last while so I'm pretty sure I can help u 
 
msn: ferry_hooligan@live.nl
			 
			
			
 
Got a nice sofa 
Please come and have a seat for a while 
 
 
			
		 |  
	 
 | 
	| 05-25-2011, 02:05 PM  | 
	
		
	 | 
	
		
		Simpanra 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 314 
	Threads: 28 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: SetEntityActive("shelf_high01_1", false); Doesnt work 
			 
			
				Actually....i am right, i used the secret shelf to do exactly what he is asking...so please don't say we are wrong without knowing for sure =) 
 
I used the secret shelf to set it inactive and then set another one active =) 
 
			 
			
			
			
		 |  
	 
 | 
	| 05-25-2011, 04:34 PM  | 
	
		
	 |