Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Restart a Level?
Soon Offline
Member

Posts: 50
Threads: 11
Joined: Sep 2010
Reputation: 0
#1
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
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
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
Find
Soon Offline
Member

Posts: 50
Threads: 11
Joined: Sep 2010
Reputation: 0
#3
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
Find
Soon Offline
Member

Posts: 50
Threads: 11
Joined: Sep 2010
Reputation: 0
#4
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
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
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
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
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
Find
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
#7
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
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#8
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
Find




Users browsing this thread: 1 Guest(s)