RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
changing Gameover into a common event

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 87
RIP w-hat the fork
I need a script that when you get a gameover in battle, or in a way OTHER THAN an event, that it does not actually get a gameover, but instead calls a common event.

HOWEVER
I still want the event command gameover to be the actual gameover, so when that event occurs, it calls the gameover screen, like how it's supposed to.
Huge sig is huuuuge.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
For the second part, actually making it gameover at the end of the common event, you can just use the event command, so the scripting portion is just making it call a common event. That's not hard. If I have the time I'll look at it.

**
Rep:
Level 87
RIP w-hat the fork
Huge sig is huuuuge.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Alright, all you need to do is paste this scriptlet into it's own script above Main.

Code: [Select]
class Scene_Battle
 
  # Aliases update to run before everything else in the method
  alias gameover_to_common_event update
  def update
    if $game_temp.gameover
      # Editable region. This number below is the ID of the common event you
      # wish to run. It is 1 by default, change it to suit your game.
      $game_temp.common_event_id = 1
      $scene = Scene_Map.new
      $game_temp.gameover = false
      return
    end
    gameover_to_common_event
  end
end

I left all the work for you to do inside the common event itself. I did not change bgm or tint screen or teleport or anything, so you need to arrange the common event. Specifically, you need to place at thee bottom of the common event the Game Over command. This also only corrects for battle, as that is the only situation I can think of that needs to be corrected for. To Game Over in an event, just call the Game Over common event as you would call any other common event.

**
Rep:
Level 87
RIP w-hat the fork
:D
Thank you so much!
Exactly what I wanted!

That is the second script you made for me ^_^

Tell me how to give rep....
Huge sig is huuuuge.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
You can only edit rep once you have 75 posts. Don't worry about it; it's not necessary