Gameover Common Event

Started by Noob, January 17, 2011, 04:50:17 pm

Previous topic - Next topic

Noob

How do you make a gameover commont event that will override the default game over screen, or, it it's already overriden by blizz-abs or something, will make something happen when you die (lose items/gold, respawn, etc.)? Thanks!

Starrodkirby86

January 17, 2011, 05:20:23 pm #1 Last Edit: January 17, 2011, 05:22:15 pm by Starrodkirby86
Can't say my solution here is the best...But...

Hmm...

What you'd probably want to do is to replace all instances where if a Game Over is true, then RPG Maker XP will go to the Game Over Scene. In the script editor, there should multiple instances where the script asks

if $game_temp.gameover


and the like.

We'll probably need to comment or delete them out. (Adding a # can turn it into a comment).

So...

We should probably comment out or remove Line 75 - 80 in Scene_Map:

    # If game over
   if $game_temp.gameover
     # Switch to game over screen
     $scene = Scene_Gameover.new
     return
   end


Then in the Common Events, have a all-running Conditional Branch that has a script condition saying:
$game_temp.gameover = true


And do what else you need to do after that.

If you want to do the same for Scene_Battle, then that's a little bit different. You'd probably want it to return to the map. So maybe instead of the Scene_GameOver it'll go to, replace that to Scene_Map or something. Whatever the script does after a battle is won, you should emulate.

...I think that's how you do it. If anyone can help me lead Noob to the right direction, then sure. @_@

I suggest you try this on some test project, since editing the original system files can turn to be a yucky mess.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Wizered67

Look for auto gameover in the Blizz-ABS config and set it to false. Then you can do whatever you want in a common event when you die.

Noob

kirby ur idea sorta works but its wierd bcuz instead of checking for if $game_temp.gameover=true, it seems to set it to true, so either nothing happens, or, when i dont comment out that stuff i get the gameover screen. but i have another idea, and i need to know, how can i call a common event using a script? thanks :)

nathmatt

that is because when you use its used as a condition you need == so it would be
if $game_temp.gameover == true
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Starrodkirby86

Whoops, my bad.

Meant to add the two =='s. I originally had $game_temp.gameover = $game_party.all_dead or something since that was in the script. I forgot about those =='s. Thanks nathmatt.  :^_^':

For the conditional though, having the if would already be redundant, so you only need $game_temp.gameover == true.

Wizered's point about Blizz-ABS's autogameover might be more useful, personally. oxo See what you can do with that as well.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




WhiteRose

Quote from: Wizered67 on January 17, 2011, 05:43:52 pm
Look for auto gameover in the Blizz-ABS config and set it to false. Then you can do whatever you want in a common event when you die.



This.

Noob

Well, I tried that, turned off auto gameover, put in the new conditional script with ==, and died in the game. It didn't call my common event, instead it got stuck in a loop with some sound (collapse sound?) and just sounded like a car engine starting or something. But I've got another idea, if I leave auto-gameover on but replace the gameover code with code that calls my common event. So my next qustion is.....how do you call a common event using script? thanks! :)

Wizered67

There's no need to. If it does weird things when you set auto gameover to false its your common event to blame. I'm using auto gameover on false and have a common event that works fine.

Noob

Well then could you help me with my common event? I set it to run parallel, and I turned on the switch that runs it parallel. For my initial test, all that I put inside it was:
Conditional Branch: $game_temp.gameover==true
Text: You are dead.
Branch End
It never showed me the text, all that happened was the error I described above.

Wizered67

Here's mine: (it's paralel process with the switch being one turned on by default)

Set a variable to player's HP.
conditional branch: if the HP is 0
Recover all entire party.
Dramatic screen flash.
Transfer player to respawn map.

My example would only work if you only have one actor in the party, but that could be fixed by adding additional conditional branches in the beginning.

Noob

That would be great, except for the fact that in the set of values that you can set a variable to, they included actor HP, (I don't see how that would ever by applicable), but not party member HP. any ideas?

The Niche

Something along the lines of $game_party.actors[0].hp == 0

0 is the slot in the party.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!