Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Gameover based on level. (Edit of Eccids title version.)

Introduction
This is an edit of Eccid's 'Title Based On Level Script'. It is now a Gameover Based On Level Script.

Features
  • Change your game over screen when you reach a certain level.
Screenshots
Thats kind of...impossible.

Script
Find this line in 'Scene_Gameover'
Code:
@sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name)
It is line 14 by default.

Replace that line with this:
Code:
#===============================================================================

#Gameover Screen Based on Level Script
#By: Eccid
#With help fromn kaito
#Edited to gameover by Sam Drew
#-------------------------------------------------------------------------------	
#---Start Edit---

case $game_actors[1].level#finds actor level
when 1 .. 24#When actor level is...
	@sprite.bitmap = RPG::Cache.gameover("1.png")#Show gameover
	
when 25 .. 49
	@sprite.bitmap = RPG::Cache.gameover("2.png")
	
when 50 .. 74
	@sprite.bitmap = RPG::Cache.gameover("3.png")
	
when 75 .. 100
	@sprite.bitmap = RPG::Cache.gameover("4.png")
  end
else
  @sprite.bitmap = RPG::Cache.gameover("1.png")#set regular gameover
end

#---End Edit---
#===============================================================================

Instructions
Just put in the extra game overs into the gameover folder, and name them 1, 2, 3 ,4 etc. If you don't want to name them that then you can edit the script so it has their names there.

You can edit what levels too, I think its pretty straight foward though.

Credits & Thanks
Credit to Eccid for the original script - Good job, mate.
Thanks to Kaito for helping out Eccid - Good job also.

Author's notes
Well, AH! I guess thats me.
I think the script should all be there, I've checked it a few times over, and to me its ok.
Enjoy!
And don't forget to credit Eccid, Kaito and I if you use it! :D
(If some of you did'nt know, this is my first real attempt at a script...so..yeah.)


EDIT HISTORY: Changed the ... in the code to .. like Trickster said! :D
 
Nice attempt at a first script, its nice to see new scripts being posted instead of old stuff, A few things I found a bit off though

1)
Code:
case $game_actors[1].level

Why only the first actor in the database why not get the average party level instead?

2) There is a little bug in your when statements
Code:
when 1 ... 24
when 25 ... 49
when 50 ... 74
when 75 ... 100
The ... means exclude the end point so if the actor's level is 24,49, or 74 it would display the first 1.png as the gameover graphic to fix that just change the ... to .. to include the end point
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top