| 
		
	
		| Soon   Member
 
 Posts: 50
 Threads: 11
 Joined: Sep 2010
 Reputation: 
0
 | 
			| How to Restart a Level? 
 
				Hello,
 I am creating a scene in which I want the player to learn through trial and error as they die. I want to make it so when the player dies, the entire level gets reloaded from the beginning.
 
 I am trying to avoid checkpoints because it ruins the scene I am trying to create, because if I use a checkpoint, it gives the player the feeling of being immortal, and not really scared of dying. However, I don't want to make death permanent like in Justine, as it would be infuriating for the player, given the length of my FC.
 
 I don't really see any way for this to be possible in the functions list.
 
 Anyone have any ideas?
 
 Thank you for your time.
 |  |  
	| 06-05-2015, 07:20 PM |  |  
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 | 
			| RE: How to Restart a Level? 
 
				So... You don't want the player to die. But you do want the level to reset when the player fails.
 So use a function when the player fails and then reset the level manually.
 ResetProp(string asName); can help you there.
 
 Trying is the first step to success. |  |  
	| 06-05-2015, 09:23 PM |  |  
	
		| Soon   Member
 
 Posts: 50
 Threads: 11
 Joined: Sep 2010
 Reputation: 
0
 | 
			| RE: How to Restart a Level? 
 
				 (06-05-2015, 09:23 PM)FlawlessHappiness Wrote:  So... You don't want the player to die. But you do want the level to reset when the player fails.
 So use a function when the player fails and then reset the level manually.
 ResetProp(string asName); can help you there.
 
Oh wow. I didn't even know resetting props was possible. Thanks!
			 |  |  
	| 06-06-2015, 03:23 AM |  |  
	
		| Soon   Member
 
 Posts: 50
 Threads: 11
 Joined: Sep 2010
 Reputation: 
0
 | 
			| RE: How to Restart a Level? 
 
				fixed
			 
				
(This post was last modified: 06-06-2015, 06:08 AM by Soon.)
 |  |  
	| 06-06-2015, 05:31 AM |  |  
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 | 
			| RE: How to Restart a Level? 
 
				Sometimes it's worth going to the The engine script's page  and Ctrl+F searching something random. Like "reset". You may find something.
			
 Trying is the first step to success. |  |  
	| 06-06-2015, 09:11 AM |  |  
	
		| Mudbill   Muderator
 
 Posts: 3,881
 Threads: 59
 Joined: Apr 2013
 Reputation: 
179
 | 
			| RE: How to Restart a Level? 
 
				I would also recommend just skimming through the different functions on the page to see what is available. Lots of fun stuff there.
			 
 |  |  
	| 06-07-2015, 01:15 AM |  |  
	
		| Darkfire   Senior Member
 
 Posts: 371
 Threads: 22
 Joined: May 2014
 Reputation: 
15
 | 
			| RE: How to Restart a Level? 
 
				Use this (check engine scripts to know what it does)CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
 And then in the func that is called use this
 ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
 And use the same map. It might work.
 
 |  |  
	| 06-07-2015, 03:13 PM |  |  
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 | 
			| RE: How to Restart a Level? 
 
				 (06-07-2015, 03:13 PM)Darkfire Wrote:  Use this (check engine scripts to know what it does)CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
 And then in the func that is called use this
 ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
 And use the same map. It might work.
 
Firstly
  (06-05-2015, 07:20 PM)Soon Wrote:  I am trying to avoid checkpoints 
But I also think changing the map might not always be the solution, as some entities might have FullGameSave checked for later or earlier use.
			 
 Trying is the first step to success. |  |  
	| 06-07-2015, 03:15 PM |  |  |