Checkpoint System

Bravo2Kilo

ᕦ(ò_óˇ)ᕤ
Veteran
Joined
Mar 21, 2012
Messages
48
Reaction score
6
Primarily Uses
Checkpoint System




By: Bravo2Kilo


Introduction

This script adds a checkpoint system to the game. If the player dies, instead of a game over you will respawn at a checkpoint. This script also has a lives feature, when you die you will lose a life, if you have no lives you will get a game over.

Screenshot

none

Script

You can get the script from my blog here

Credit

- Bravo2Kilo

Terms of Use

Terms of use can be found at my blog
 
Last edited by a moderator:

Mudgrunt

Veteran
Veteran
Joined
May 24, 2012
Messages
34
Reaction score
0
Primarily Uses
Isnt this is what saves are for? Oh well Nice script :)
 

Maebius

Veteran
Veteran
Joined
Oct 29, 2012
Messages
40
Reaction score
2
Primarily Uses
Isnt this is what saves are for? Oh well Nice script :)
True enough, but I can imagine plenty of game styles, especiall horror-themed ones, that might use this system.

I was planning on looking into a possible "remove save feature" after I get used to the program myself, as I wanted to have a "save point" in my games, rather than saving at-will, if that were even possible.

This script works great for hinting at that possibility already! :D
 

Mudgrunt

Veteran
Veteran
Joined
May 24, 2012
Messages
34
Reaction score
0
Primarily Uses
Oh ya I never really though of that...hmmm I might just make a horror game...
 

Bravo2Kilo

ᕦ(ò_óˇ)ᕤ
Veteran
Joined
Mar 21, 2012
Messages
48
Reaction score
6
Primarily Uses
I just updated the script fixing a bug.
 

mariomshinu

Villager
Member
Joined
Nov 19, 2013
Messages
15
Reaction score
1
First Language
Spanish
Primarily Uses
I just cant make the script work. If I die I get no respawn or anything else. Please some help here? 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
I just cant make the script work. If I die I get no respawn or anything else. Please some help here? 
The script is configured by switches as defined in the beginning of the script.

Which switches have you choosen to control the script's function, and have you added the neccessary events with control switch commands to activate the scripts function?

Is it possible that you forgot to reserve those switches and have used them for other functions in the game, resulting in random disabling of the script?
 

mariomshinu

Villager
Member
Joined
Nov 19, 2013
Messages
15
Reaction score
1
First Language
Spanish
Primarily Uses
Thanks for response. I think I cannot make ir work because I  have problems with the language but I will try. I have just made 5 new events to check the script. This is my example:

Event 1. Parallel process. Switch that actives CHECKPOINT_SWITCH = 1

Event 2. Parallel process. Switch that actives the life system LIFE_SWITCH = 2

Event 3. Active by touching the event. Script call, calling: set_checkpoint

Event 4. Active by touching the event. Script call, calling: add_life (1)

Event 5. Active by touching the event. Game over.

In that order. Am I doing everything wrong? Can anyone put an example that works please? Thanks in advance.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
How did you activate the switches? Please provide screenshots of the events.

That said - a parallel process repeats itself until deactivated, which means that your events one and two will be run 60 times per second, activating those switches with every frame again and again. Depending on what they're doing exactly this could cause a lot of problems, and it will increase lag.

another problem might be if you have other events using the same switches - you should always name any switch you're using to prevent them from being used for two different things, and in the case of script-used switches, that's even more important.

Or one of your events 3 to 5 might not have been activated correctly due to wrong conditions - that would also cause problems.

And no, no one can put on an example that works because there are to many specific problems to see, and we would need to make a game with those scripts (while you have everything already setup and we would only need to check for the error in your events).

Only with screenshots of your events we can check the details of what might have gone wrong.
 

mariomshinu

Villager
Member
Joined
Nov 19, 2013
Messages
15
Reaction score
1
First Language
Spanish
Primarily Uses
01.png This is how my scene like

02.png Here we have the checkpoint switch turning on by touching event.

03.png Here we have the life system switch turning on by touching event.

04.png Here we have the event that calls the add_life (1) script

05.png Here we have the event that calls the set_checkpoint script

06.png And finally here we have the game over event

To make the example easier all the buttons, events or wharever are actives by touch event and below the character. 

Thanks again.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
The script does exactly what it is intended to do - the problem is in your logic.

I assumed that you would be able to use event 3 several times to add more than one life, but your coding (with the self-switch) enforces that the player can only get one life once.

And if the life-counter in that script is activated, then it's game over when you loose the last life (see it's description)

Player has 1 life - dies - gameover

The script works exactly as intended, try it with more than one live ;-)

And if you force a gameover by a gameover command, then that goes directly to the gameover screen - that is not the same as loosing a live in combat.

I don't see any combat event on the map - are you going around until you die by random encounter or how do you test that script's behaviour of returning the player to the checkpoint if he dies?
 

mariomshinu

Villager
Member
Joined
Nov 19, 2013
Messages
15
Reaction score
1
First Language
Spanish
Primarily Uses
I didn't know that the game over command didn't work with this type of things. I just changed the add_life (1) to add_life (5) and got killed in a battle and it's done, script working for me. Thank you so much for your help.

Edit: I just try it again with the script add_life (1) and works, so I imagine the big problem was I was calling the Game Over event. anyway thanks for the help.

Edit: So... another question. Is there any way I could see a counter of remaining lifes and / or a message when you respawn at the checkpoint? 
 
Last edited by a moderator:

Rokazulu

Veteran
Veteran
Joined
Aug 31, 2016
Messages
103
Reaction score
2
First Language
English
Primarily Uses
RMVXA
This is an old thread so I wonder if anyone can still help.

I can't seem to get this script working. I call set_checkpoint even script through one event, and then when I die it just does a game over.

Is there anything else I need to do?

(Additionally, is there a way to add a text box once the player respawns?)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top