Icaab2608 
			Member0  
	
		
			
 
				At me a problem with a script:
void OnStart () AddEntityCollideCallback ( "Player" ,  "Collapse" ,  "Collapse" ,  true ,  1 ) void Collapse ( string  & in asParent ,  string  & in asChild ,  int alState ) SetEntityActive ( "servant_nyan_2" ,  false ); SetEntityActive ( "thin_straight_long_1" ,  false ); SetEntityActive ( "drag_brown_rock_1" ,  false ); SetEntityActive ( "block_box_nonchar_1" ,  false ); SetEntityActive ( "thin_straight_long_2" ,  true ); SetEntityActive ( "drag_brown_rock_1" ,  true ); SetEntityActive ( "drag_brown_rock_2" ,  true ); SetEntityActive ( "drag_brown_rock_3" ,  true ); SetEntityActive ( "drag_brown_rock_4" ,  true ); SetEntityActive ( "drag_brown_rock_5" ,  true ); SetEntityActive ( "drag_brown_rock_6" ,  true ); SetEntityActive ( "drag_brown_rock_7" ,  true ); SetEntityActive ( "drag_brown_rock_8" ,  true ); SetEntityActive ( "drag_brown_rock_9" ,  true ); SetEntityActive ( "drag_brown_rock_10" ,  true ); SetEntityActive ( "drag_brown_rock_11" ,  true ); SetEntityActive ( "drag_brown_rock_12" ,  true ); SetEntityActive ( "drag_brown_rock_13" ,  true ); SetEntityActive ( "drag_brown_rock_14" ,  true ); SetEntityActive ( "drag_brown_rock_15" ,  true ); SetEntityActive ( "drag_brown_rock_16" ,  true ); SetEntityActive ( "drag_brown_rock_17" ,  true ); SetEntityActive ( "drag_brown_rock_18" ,  true ); SetEntityActive ( "drag_brown_rock_19" ,  true ); SetEntityActive ( "drag_brown_rock_20" ,  true ); SetEntityActive ( "drag_brown_rock_21" ,  true ); SetEntityActive ( "drag_brown_rock_22" ,  true ); SetEntityActive ( "drag_brown_rock_23" ,  true ); SetEntityActive ( "drag_brown_rock_24" ,  true ); SetEntityActive ( "drag_brown_rock_25" ,  true ); SetEntityActive ( "drag_brown_rock_26" ,  true ); SetEntityActive ( "drag_brown_rock_27" ,  true ); SetEntityActive ( "drag_brown_rock_28" ,  true ); SetEntityActive ( "drag_brown_rock_29" ,  true ); SetEntityActive ( "brown_cave_in_1" ,  true ); SetEntityActive ( "brown_cave_in_2" ,  true ); SetEntityActive ( "stone_small01_brown_1" ,  true ); SetEntityActive ( "stone_small01_brown_2" ,  true ); SetEntityActive ( "stone_small01_brown_3" ,  true ); SetEntityActive ( "stone_small01_brown_4" ,  true ); SetEntityActive ( "stone_med01_brown_1" ,  true ); StopMusic ( 3.0 ,  0 ); DestroyParticleSystem ( "ParticleSystem_1" ); DestroyParticleSystem ( "ParticleSystem_2" ); DestroyParticleSystem ( "ParticleSystem_5" ); DestroyParticleSystem ( "ParticleSystem_6" ); DestroyParticleSystem ( "ParticleSystem_14" ); DestroyParticleSystem ( "ParticleSystem_19" ); DestroyParticleSystem ( "ParticleSystem_15" ); DestroyParticleSystem ( "ParticleSystem_62" ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_1" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_2" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_3" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_4" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_5" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_6" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_7" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_8" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_9" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_10" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_11" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_12" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_13" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_14" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS1_15" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS1_16" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS1_17" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS2_1" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS2_2" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS2_3" ,  true ); PreloadParticleSystem ( "ps_dust_whirl" ); 
[img]
[/img]
VIDEO 
The error is,that not all objects become active.
File:http://www.mediafire.com/download/j8fbo1efxstvf11/dr1map.rar
			
				
(This post was last modified: 07-22-2013, 07:05 AM by Icaab2608 .) 
 
				
			 
		 
 
 
	07-21-2013, 05:09 PM  
		
	 
 
	
		ExpectedIdentifier 
			Member11  
	
		
			
RE: Script collapse. 
 
				 (07-21-2013, 05:09 PM) Icaab2608 Wrote:  void OnStart () AddEntityCollideCallback ( "Player" ,  "Collapse" ,  "Collapse" ,  true ,  1 ) void Collapse ( string  & in asParent ,  string  & in asChild ,  int alState ) SetEntityActive ( "servant_nyan_2" ,  false ); SetEntityActive ( "thin_straight_long_1" ,  false ); SetEntityActive ( "drag_brown_rock_1" ,  false ); SetEntityActive ( "block_box_nonchar_1" ,  false ); SetEntityActive ( "thin_straight_long_2" ,  true ); SetEntityActive ( "drag_brown_rock_1" ,  true ); SetEntityActive ( "drag_brown_rock_2" ,  true ); SetEntityActive ( "drag_brown_rock_3" ,  true ); SetEntityActive ( "drag_brown_rock_4" ,  true ); SetEntityActive ( "drag_brown_rock_5" ,  true ); SetEntityActive ( "drag_brown_rock_6" ,  true ); SetEntityActive ( "drag_brown_rock_7" ,  true ); SetEntityActive ( "drag_brown_rock_8" ,  true ); SetEntityActive ( "drag_brown_rock_9" ,  true ); SetEntityActive ( "drag_brown_rock_10" ,  true ); SetEntityActive ( "drag_brown_rock_11" ,  true ); SetEntityActive ( "drag_brown_rock_12" ,  true ); SetEntityActive ( "drag_brown_rock_13" ,  true ); SetEntityActive ( "drag_brown_rock_14" ,  true ); SetEntityActive ( "drag_brown_rock_15" ,  true ); SetEntityActive ( "drag_brown_rock_16" ,  true ); SetEntityActive ( "drag_brown_rock_17" ,  true ); SetEntityActive ( "drag_brown_rock_18" ,  true ); SetEntityActive ( "drag_brown_rock_19" ,  true ); SetEntityActive ( "drag_brown_rock_20" ,  true ); SetEntityActive ( "drag_brown_rock_21" ,  true ); SetEntityActive ( "drag_brown_rock_22" ,  true ); SetEntityActive ( "drag_brown_rock_23" ,  true ); SetEntityActive ( "drag_brown_rock_24" ,  true ); SetEntityActive ( "drag_brown_rock_25" ,  true ); SetEntityActive ( "drag_brown_rock_26" ,  true ); SetEntityActive ( "drag_brown_rock_27" ,  true ); SetEntityActive ( "drag_brown_rock_28" ,  true ); SetEntityActive ( "drag_brown_rock_29" ,  true ); SetEntityActive ( "brown_cave_in_1" ,  true ); SetEntityActive ( "brown_cave_in_2" ,  true ); SetEntityActive ( "stone_small01_brown_1" ,  true ); SetEntityActive ( "stone_small01_brown_2" ,  true ); SetEntityActive ( "stone_small01_brown_3" ,  true ); SetEntityActive ( "stone_small01_brown_4" ,  true ); SetEntityActive ( "stone_med01_brown_1" ,  true ); StopMusic ( 3.0 ,  0 ); DestroyParticleSystem ( "ParticleSystem_1" ); DestroyParticleSystem ( "ParticleSystem_2" ); DestroyParticleSystem ( "ParticleSystem_5" ); DestroyParticleSystem ( "ParticleSystem_6" ); DestroyParticleSystem ( "ParticleSystem_14" ); DestroyParticleSystem ( "ParticleSystem_19" ); DestroyParticleSystem ( "ParticleSystem_15" ); DestroyParticleSystem ( "ParticleSystem_62" ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_1" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_2" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_3" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_4" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_5" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_6" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_7" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_8" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_9" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_10" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_11" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_12" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_13" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_childsnake_water_stream.ps" ,  "PS1_14" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS1_15" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS1_16" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS1_17" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS2_1" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS2_2" ,  true ); CreateParticleSystemAtEntity ( "" ,  "ps_steam.ps" ,  "PS2_3" ,  true ); PreloadParticleSystem ( "ps_dust_whirl" ); 
VIDEO 
Some entities can't be set active/unactive. These are StaticProp entities. Also static objects can't be set active/unactive. I'm assuming this is your problem.
Also a little tip, when doing something to multiple objects, it is better and less time consuming to use a for loop, like this:
for( int i  =  0 ;  i  < 31 ;  i ++) SetEntityActive ( "rock_" + i ,  true );  
This would set all entity rocks named rock_1 to rock_30 active.
			
 
			
			
Closure ModDB page:
 
 
 
	07-21-2013, 05:38 PM  
		
	 
 
	
		ClayPigeon 
			Member8  
	
		
			
RE: Script collapse. 
 
				I also encountered this problem when I tried to set gallery images active and deactivate them, but the didn't appear. So yeah, StaticProps can't be deactivated.
			
			
			
		 
 
 
	07-21-2013, 05:42 PM