| bartimeus   Junior Member
 
 Posts: 20
 Threads: 6
 Joined: Jun 2012
 Reputation: 
0
 | 
			| ChangeMap doesn't work! 
 
				Hi!I'm actually working on a custom story, and at a moment the player is supposed to fall on a hole... So I created a ChangeMap script but it doesn't work. In fact, the next map don't load and I fall endlessly...I've already got a map named "souterrains" and a playerstartarea on it...
 Here's the script:
 
 
 void OnStart()
 {
 AddEntityCollideCallback("Player", "hole", "Changement", true, 1);
 }
 
 void Changement(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound)
 {
 ChangeMap("souterrains", "PlayerStartArea_1","","");
 }
 |  | 
	| 06-16-2012, 06:01 AM |  | 
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: ChangeMap doesn't work! 
 
				You have the wrong callback syntax.
			 
 |  | 
	| 06-16-2012, 07:14 AM |  | 
	
		| bartimeus   Junior Member
 
 Posts: 20
 Threads: 6
 Joined: Jun 2012
 Reputation: 
0
 | 
			| RE: ChangeMap doesn't work! 
 
				Please, can you tell me where I have spelled it wrong?
			 
				
(This post was last modified: 06-16-2012, 03:18 PM by bartimeus.)
 |  | 
	| 06-16-2012, 03:17 PM |  | 
	
		| bartimeus   Junior Member
 
 Posts: 20
 Threads: 6
 Joined: Jun 2012
 Reputation: 
0
 | 
			| RE: ChangeMap doesn't work! 
 
				Found it. I had to replace:void Changement(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound)
 
 
 with:
 void Changement(string &in asParent, string &in asChild, int alState)
 |  | 
	| 06-16-2012, 05:04 PM |  |