Tiger 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,874 
	Threads: 16 
	Joined: Nov 2012
	
 Reputation: 
55
		
	 | 
	
		
			
Change map with area... 
			 
			
				So, I want the player to walk into an area and it's supposed to change level. I'm pretty sure this is possible since the creator of 'Killings in Alstadt' did this. Amnesia doesn't crash and I don't get an error message, but I know I'm not doing anything wrong. This is the part of the script: 
void OnStart() { AddEntityCollideCallback("Player", "ChangeLevel_1", "LeaveMap_1", true, 1); }
  void LeaveMap_1(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "player_bodyfall.snt", "Player", 0.1f, false); FadeOut(2.0f); ChangeMap("InsideCabin.map", "PlayerStartArea_2", "", ""); }
  void OnLeave() { SetupLoadScreen("LoadingText", "load_1", 1, "game_loading_well.jpg"); } 
 
 
edit for no bump: I had named the ScriptArea in the level editor and the script differently
 
			 
			
			
			
				
(This post was last modified: 03-29-2013, 12:32 PM by Tiger.)
 
				
			 
		 |  
	 
 | 
 
	| 03-09-2013, 12:43 AM  | 
	
		
	 | 
 
 
	
		
		i3670 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,308 
	Threads: 74 
	Joined: Oct 2011
	
 Reputation: 
36
		
	 | 
	
		
			
RE: Change map with area... 
			 
			
				capital P in player.
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-09-2013, 01:27 AM  | 
	
		
	 | 
 
 
	
		
		7heDubz 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,329 
	Threads: 40 
	Joined: Feb 2013
	
 Reputation: 
41
		
	 | 
	
		
			
RE: Change map with area... 
			 
			
				.snt", "player", 0 
 
 
Yeah capital P right here 
 
 
.snt", "Player", 0
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-09-2013, 01:38 AM  | 
	
		
	 | 
 
 
	
		
		Tiger 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,874 
	Threads: 16 
	Joined: Nov 2012
	
 Reputation: 
55
		
	 | 
	
		
			
RE: Change map with area... 
			 
			
				Still doesn't work. I also changed the 'player_bodyfall5.snt' to 'player_bodyfall.snt', but to no avail.
			 
			
			
			
		 |  
	 
 | 
 
	| 03-09-2013, 01:38 AM  | 
	
		
	 | 
 
 
	
		
		NaxEla 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 415 
	Threads: 5 
	Joined: Dec 2012
	
 Reputation: 
28
		
	 | 
	
		
			
RE: Change map with area... 
			 
			
				There two places where you need a capital P. One for AddEntityCollideCallback and one for PlaySoundAtEntity.
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-09-2013, 03:46 AM  | 
	
		
	 | 
 
 
	
		
		7heDubz 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,329 
	Threads: 40 
	Joined: Feb 2013
	
 Reputation: 
41
		
	 | 
	
		
			
RE: Change map with area... 
			 
			
				ollideCallback("player", "Cha 
TO 
ollideCallback("Player", "Cha
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-09-2013, 04:23 AM  | 
	
		
	 | 
 
 
	
		
		Tiger 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,874 
	Threads: 16 
	Joined: Nov 2012
	
 Reputation: 
55
		
	 | 
	
		
			
RE: Change map with area... 
			 
			
				Like I said, it doesn't work...
			 
			
			
			
		 |  
	 
 | 
 
	| 03-09-2013, 11:27 AM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Change map with area... 
			 
			
				Run the script again, then check the hpl.log for any insight.
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-09-2013, 11:56 AM  | 
	
		
	 | 
 
 
	
		
		Tiger 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,874 
	Threads: 16 
	Joined: Nov 2012
	
 Reputation: 
55
		
	 | 
	
		
			
RE: Change map with area... 
			 
			
				I have no idea what to do with the hpl.log ._.
			 
			
			
			
		 |  
	 
 | 
 
	| 03-10-2013, 10:26 AM  | 
	
		
	 | 
 
 
	
		
		No Author 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 962 
	Threads: 10 
	Joined: Jun 2012
	
 Reputation: 
13
		
	 | 
	
		
			
RE: Change map with area... 
			 
			
				 (03-09-2013, 12:43 AM)Tigerwaw Wrote:  So, I want the player to walk into an area and it's supposed to change level. I'm pretty sure this is possible since the creator of 'Killings in Alstadt' did this. Amnesia doesn't crash and I don't get an error message, but I know I'm not doing anything wrong. This is the part of the script: 
 
void OnStart() { AddEntityCollideCallback("Player", "ChangeLevel_1", "LeaveMap_1", true, 1); }
  void LeaveMap_1(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "player_bodyfall.snt", "Player", 0.1f, false); FadeOut(2.0f); ChangeMap("InsideCabin.map", "PlayerStartArea_2", "", ""); }
  void OnLeave() { SetupLoadScreen("LoadingText", "load_1", 1, "game_loading_well.jpg"); } 
 
  
Shouldn't the :
 AddEntityCollideCallback("Player", "ChangeLevel_1", "LeaveMap_1", true, 1); 
 
 change into :
 AddEntityCollideCallback("Player", "ChangeLevel_1", "LeaveMap_1", true, 0); 
 
 ?
			  
			
			
 
			
		 |  
	 
 | 
 
	| 03-10-2013, 11:14 AM  | 
	
		
	 | 
 
 
	 
 |