Chilton 
 
 
		
			Member 
			
			
			
 
			
	Posts: 138 
	Threads: 9 
	Joined: Sep 2010
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Making a timed room transition (SOLVED) 
			 
			
				 (10-02-2010, 07:38 AM)Alexander Wrote:   (10-02-2010, 06:08 AM)Chilton Wrote:  Ok 
To go into more detail, im trying to make a script for a map in which you are transitioned into the map (Irrelevant), then after a set time, you automatically move to a new map. 
------ 
void OnStart() 
{ 
	AddTimer("Countdown", 500f, "CountdownHallucination"); 
} 
 
void CountdownHallucination(string &in asTimer) 
{ 
	ChangeMap("map 3.map", "PlayerStartArea_1", "player_climb.snt", "player_crouch.snt"); 
} 
------ 
^^ Is what i currently have, and the script is accepted, but after the 500f, nothing happens. I even left it for longer and nothing happens. 
What am i not doing here? 
 
As usual, any guidance is much appreciated.  
Well I just tested something and it worked for me. Try this. 
 
void CountdownHallucination(string &in asTimer) 
{ 
    ChangeMap("map3.map", "PlayerStartArea_1", "", ""); 
 
}
  
OnStart 
AddTimer("Countdown", 10.0, "CountdownHallucination");
  
I noticed you have a space in your map name  "map 3.map". It's probably best to not have any spaces, underscore would be a better option. Also.. I'm not sure why it would work using "500f", since I get an error with that. "500.0f" is what it should be, or "500" or "500.0" (without the quotation marks of course ^_^). 
 
This is coming from someone with no other scripting experience other than Amnesia. So don't take my word for it   
Removed 500f, and renamed the maps a bit, and now it magically works. 
Im not even going to read in to how such tiny things made a difference, but the important thing is that it wont happen again
 
Thankyou very much
			  
			
			
			
		 |  
	 
 | 
	| 10-02-2010, 07:41 AM  | 
	
		
	 |