Steve 
 
 
		
			Member 
			
			
			
 
			
	Posts: 178 
	Threads: 17 
	Joined: Jun 2012
	
 Reputation: 
7
		
	 | 
	
		
			
New Checkpoint problem second Checkpoint 
			 
			
				pls help I know the basics
			 
			
			
			
				
(This post was last modified: 06-28-2012, 08:47 PM by Steve.)
 
				
			 
		 |  
	 
 | 
 
	| 06-27-2012, 10:08 PM  | 
	
		
	 | 
 
 
	
		
		Adny 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,766 
	Threads: 6 
	Joined: Mar 2012
	
 Reputation: 
173
		
	 | 
	
		
			
RE: How do you make Check points? 
			 
			
				This might help: 
 
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); 
 
 
Sets a checkpoint at which the player will respawn in case he dies. 
Callback syntax: void MyFunc(string &in asName, int alCount)  
Count is 0 on the first checkpoint load! 
asName - the internal name 
asStartPos - the name of the StartPos in the editor 
asCallback - the function to call when the player dies/respawns 
asDeathHintCat - the category of the death hint message to be used in the .lang file 
asDeathHintEntry - the entry in the .lang file
			 
			
			
 
I rate it 3 memes. 
			
		 |  
	 
 | 
 
	| 06-27-2012, 10:17 PM  | 
	
		
	 | 
 
 
	
		
		Steve 
 
 
		
			Member 
			
			
			
 
			
	Posts: 178 
	Threads: 17 
	Joined: Jun 2012
	
 Reputation: 
7
		
	 | 
	
		
			
RE: How do you make Check points? 
			 
			
				 (06-27-2012, 10:17 PM)andyrockin123 Wrote:  This might help: 
 
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); 
 
 
Sets a checkpoint at which the player will respawn in case he dies. 
Callback syntax: void MyFunc(string &in asName, int alCount)  
Count is 0 on the first checkpoint load! 
asName - the internal name 
asStartPos - the name of the StartPos in the editor 
asCallback - the function to call when the player dies/respawns 
asDeathHintCat - the category of the death hint message to be used in the .lang file 
asDeathHintEntry - the entry in the .lang file Well thanx but I know the code I don't get the other stuff look I have this.
 void OnStart(){  some AddUseItemCallbacks  AddEntityCollideCallback("Player", "RD", "DeathSpawn", false, 1);  }void DeathSpawn(string &in asParent, string &in asChild, int alState)  {  SetEntityActive("RA", false);  CheckPoint("CP", "RA", "DeathFunc1", "RespawnDeath", "RespawnEntr");  }void DeathFunc1(string &in asName, int alCount)  {  SetEntityActive("RA", true);  } 
 
 RA = The player start's area name 
CP = Script area name 
RD = this is with the Area part of the script area(PlayerInteractCallback part)
 
Can you guys tell me what I did wrong?
			  
			
			
			
				
(This post was last modified: 06-28-2012, 02:26 PM by Steve.)
 
				
			 
		 |  
	 
 | 
 
	| 06-28-2012, 07:21 AM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: How do you make Check points? 
			 
			
				 (06-28-2012, 07:21 AM)Steve Wrote:  Cany ou guys tell me what I did wrong? 
Can you tell us what your issue is, what you're trying to achieve and why you decided to try to deactivate the PlayerStart area? To me it doesn't look like you understand what you're saying you understand.
			  
			
			
 
			
		 |  
	 
 | 
 
	| 06-28-2012, 08:05 AM  | 
	
		
	 | 
 
 
	
		
		Steve 
 
 
		
			Member 
			
			
			
 
			
	Posts: 178 
	Threads: 17 
	Joined: Jun 2012
	
 Reputation: 
7
		
	 | 
	
		
			
RE: How do you make Check points? 
			 
			
				 (06-28-2012, 08:05 AM)Your Computer Wrote:  Can you tell us what your issue is, what you're trying to achieve and why you decided to try to deactivate the PlayerStart area? To me it doesn't look like you understand what you're saying you understand. Can you tell us what your issue is?  
Well all I wan to know is which objects you have to place in the map, where you must place it and what you have to put in the "Things" names and stuff. 
what you're trying to achieve 
I'm just trying to achieve to make like a save point for if you die by like a monster you go back to that place. 
why you decided to try to deactivate the PlayerStart area.  
I guess I did that part wrong    
I would be very thankfull if you could explain detailed of how it works. 
I also want to know if I even need the script area or if I must be something else screenshots from examples would be helpfull. 
Thanks already
			  
			
			
			
				
(This post was last modified: 06-28-2012, 03:08 PM by Steve.)
 
				
			 
		 |  
	 
 | 
 
	| 06-28-2012, 02:33 PM  | 
	
		
	 | 
 
 
	
		
		Cruzore 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 301 
	Threads: 2 
	Joined: Jun 2012
	
 Reputation: 
37
		
	 | 
	
		
			
RE: How do you make Check points? 
			 
			
				Try by deleting the SetEntityActive parts.
			 
			
			
			
		 |  
	 
 | 
 
	| 06-28-2012, 02:46 PM  | 
	
		
	 | 
 
 
	
		
		Steve 
 
 
		
			Member 
			
			
			
 
			
	Posts: 178 
	Threads: 17 
	Joined: Jun 2012
	
 Reputation: 
7
		
	 | 
	
		
			
RE: How do you make Check points? 
			 
			
				 (06-28-2012, 02:46 PM)FastHunteR Wrote:  Try by deleting the SetEntityActive parts. Doesn't seem to work :S
			  
			
			
			
		 |  
	 
 | 
 
	| 06-28-2012, 03:00 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: How do you make Check points? 
			 
			
				 (06-28-2012, 02:33 PM)Steve Wrote:  Can you tell us what your issue is?  
Well all I wan to know is which objects you have to place in the map, where you must place it and what you have to put in the "Things" names and stuff. 
what you're trying to achieve 
I'm just trying to achieve to make like a save point for if you die by like a monster you go back to that place. 
why you decided to try to deactivate the PlayerStart area.  
I guess I did that part wrong    
I would be very thankfull if you could explain detailed of how it works. 
I also want to know if I even need the script area or if I must be something else screenshots from examples would be helpfull. 
Thanks already 
asName: the name you want the checkpoint to have.
 asStartPos: the name of the  PlayerStart area (i.e. the green box with the colorful arrows in its center) that you want the player to spawn in.
 asCallback: name of the callback function you want called when the player dies (useful for resetting or modifying the environment).
 asDeathHintCat: name of the LANG category that is the parent of the  asDeathHintEntry entry.
 asDeathHintEntry: name of the LANG entry that holds the death message you want to display when the player dies. 
 
I'm not sure if it is possible to deactivate PlayerStart areas when dealing with checkpoints, but it's illogical to do so when checkpoints are dependent on PlayerStart areas.
 
Does anything else in your script work? Does the hpl.log (Documents/Amnesia/Main) provide any insight?
			  
			
			
 
			
				
(This post was last modified: 06-28-2012, 03:29 PM by Your Computer.)
 
				
			 
		 |  
	 
 | 
 
	| 06-28-2012, 03:28 PM  | 
	
		
	 | 
 
 
	
		
		Cruzore 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 301 
	Threads: 2 
	Joined: Jun 2012
	
 Reputation: 
37
		
	 | 
	
		
			
RE: How do you make Check points?(still help needed) 
			 
			
				I tried it out and this one should work: 
place a script area for when you should make a checkpoint, and place a PlayerStartArea where you want to spawn after you died. 
.hps file:
 void OnStart() { AddEntityCollideCallback("Player", "ScriptAreaNameHere", "CheckpointMaker", true, 1); } void CheckpointMaker(string &in asParent, string &in asChild, int alState) {  CheckPoint ("", "PlayerStartAreaNameHere", "", "CategoryNameHere", "EntrynameHere"); } 
 
 .lang file:
 <LANGUAGE>  
<CATEGORY Name="CategoryNameHere"> 
<Entry Name="EntryNameHere">DeathMessageHere</Entry> 
</CATEGORY> 
</LANGUAGE>
 
Replace all "...NameHere" with the ones you used in the level editor/want to use.
			  
			
			
			
		 |  
	 
 | 
 
	| 06-28-2012, 03:29 PM  | 
	
		
	 | 
 
 
	
		
		Steve 
 
 
		
			Member 
			
			
			
 
			
	Posts: 178 
	Threads: 17 
	Joined: Jun 2012
	
 Reputation: 
7
		
	 | 
	
		
			
RE: How do you make Check points?(still help needed) 
			 
			
				 (06-28-2012, 03:29 PM)FastHunteR Wrote:  I tried it out and this one should work: 
place a script area for when you should make a checkpoint, and place a PlayerStartArea where you want to spawn after you died. 
.hps file: 
void OnStart() { AddEntityCollideCallback("Player", "ScriptAreaNameHere", "CheckpointMaker", true, 1); } void CheckpointMaker(string &in asParent, string &in asChild, int alState) {  CheckPoint ("", "PlayerStartAreaNameHere", "", "CategoryNameHere", "EntrynameHere"); } 
 
  .lang file: 
<LANGUAGE>  
<CATEGORY Name="CategoryNameHere"> 
<Entry Name="EntryNameHere">DeathMessageHere</Entry> 
</CATEGORY> 
</LANGUAGE>
  
Replace all "...NameHere" with the ones you used in the level editor/want to use. Thanks it worked I'm very gratefull   
It works like a charm.
			  
			
			
			
		 |  
	 
 | 
 
	| 06-28-2012, 03:47 PM  | 
	
		
	 | 
 
 
	 
 |