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.
Trying to Call a Revive Common Event for a Particular Map(Help Needed)

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 82
Hello again ,
The default thing in RPGVX seems to be gameover when defeated. In individual events every event's particular revive seems to overwrite that, but not from map properties ->troops. I tried to fiddle with the script, so now instead of gameover it's just fadeout, but the common event revive still doesn't start, eventhough I put it in database troops battle processing, and also created a new scene in the script editor. - Scene_Revive

Code: [Select]
class Scene_Revive < Scene_Base
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    $game_temp.in_battle = false
    Graphics.update
    @brightness = 255
    @map_id = ("Forest")
    initialise(013)
  end
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     common_event_id : common event ID
  #--------------------------------------------------------------------------
  def initialise(common_event_id)
    @common_event_id = common_event_id
    @interpreter = nil
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    if self.trigger == 2 and $game_switches[self.switch_id] == true
      @interpreter = Game_Interpreter.new if @interpreter == nil
    else
      @interpreter = nil
    end
  end
  #--------------------------------------------------------------------------
  # * Get Trigger
  #--------------------------------------------------------------------------
  def trigger
    return $data_common_events[@common_event_id].trigger
  end
end

I also changed things in scene battle:

Code: [Select]
 #--------------------------------------------------------------------------
  # * End Battle
  #     result : Results (0: win, 1: escape, 2:lose)
  #--------------------------------------------------------------------------
  def battle_end(result)
    if result == 2 and not $game_troop.can_lose
      call_revive
    else
      $game_party.clear_actions
      $game_party.remove_states_battle
      $game_troop.clear
      if $game_temp.battle_proc != nil
        $game_temp.battle_proc.call(result)
        $game_temp.battle_proc = nil
      end
      unless $BTEST
        $game_temp.map_bgm.play
        $game_temp.map_bgs.play
      end
      $scene = Scene_Map.new
      @message_window.clear
      Graphics.fadeout(30)
    end
    $game_temp.in_battle = false
  end

Code: [Select]
 #--------------------------------------------------------------------------
  # * Execute Screen Switch
  #--------------------------------------------------------------------------
  def update_scene_change
    case $game_temp.next_scene
    when "map"
      call_map
    when "gameover"
      call_gameover
    when "title"
      call_title
    when "revive"
      call_revive
    else
      $game_temp.next_scene = nil
    end
  end
Code: [Select]
 #--------------------------------------------------------------------------
  # * Switch to Revive Screen event 013
  #--------------------------------------------------------------------------
  def call_revive
    $scene = Scene_Revive.new
    @message_window.clear
    Graphics.update
    Graphics.fadein(30)
  end
Thank you in advance anybody who can help. :)

*
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
Well, I'm not quite sure what you're trying to do, but there are a few things about that scene that are pretty iffy. Anyay, if all you want to do is call a common event instead of Game Over, then you could use GameOver -> Common Event. However, if you are doing this as an exercise to learn Ruby, then I could help you fix the code you put up.

**
Rep: +0/-0Level 82
Thank you, yes I am trying to understand Ruby, I bought a couple of books about it, though couldn't find any books specifically about RGSS.
I think with this RPGVX Script Editor fiddling copying and pasting, I am only starting to understand a little how it works. I was glad when it actually started to play the game, instead of showing me an error. lol
I am trying to see the right map screen instead of blackness, in a previous try I managed to renew the map, but the player was dead and walking...