Save-Point

Full Version: Save-Point
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Board Message
Sorry, you do not have permission to access this resource.
Save-Point - erasing a picture at the end of a battle

Save-Point

Full Version: erasing a picture at the end of a battle
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello everyone I have been using a parallel common event where depending on what weapon the players had equipped a different picture shows on screen and I have been using that as a way to show which weapon the player has equipped in
battle as well which works fine since I am using the FPLE script use map as
battleback which takes a screenshot of the screen to use as battleback
and that includes the weapon picture . But I have a problem since I want
the player to be able to change weapons in combat I made skills which
when used would use a common event to change the players weapon and show the new weapon on screen by overlaying a new picture over the old one but when you use a show picture command in
battle the images reappears in all future battles when the battle is over it does not erase that image instead
it reappears when ever you go back into combat so what I need should
theoretically be quite simple can someone show me how to add a simple
line of programing to the battle end script which
would delete the weapon picture

out of combat
[Image: systemshock_3.png]
in combat
[Image: systemshock_9.png]
the weapon change images
[Image: incombat_rifle.png]
Find def battle_end(result) and add $game_screen.pictures[number].erase somewhere in the method. Replace the number with the number you are using for your weapon pictures.
ok i tried that I placed that line of code into the Scene_Battle1 script but it didn't seem to work
Code:
#--------------------------------------------------------------------------
  # * Battle Ends
  #     result : results (0:win 1:lose 2:escape)
  #--------------------------------------------------------------------------
  def battle_end(result)
    # Clear in battle flag
    $game_temp.in_battle = false
    # Clear entire party actions flag
    $game_party.clear_actions
    # Remove battle states
    for actor in $game_party.actors
      actor.remove_states_battle
    end
    # Clear enemies
    $game_troop.enemies.clear
    # my picture erase edit
    $game_screen.pictures[5].erase
    # Call battle callback
    if $game_temp.battle_proc != nil
      $game_temp.battle_proc.call(result)
      $game_temp.battle_proc = nil
    end
    # Switch to map screen
    $scene = Scene_Map.new
  end
and yes my pictures were number 5 :)
This may sound odd, but follow me here. In the actual 'Game_Screen' class, they define two sets of 'pictures', one set from 1-50 for the field map, and another set from 51-100 for the battle system.

I am assuming you used events to create your HUD, so I'm thinking that when you created Show Picture #5, that it is actually picture #55 in the system. Try using $game_screen.pictures[55].erase instead.

BTW: Design looks sweet.
nope still no effect
Okay, let's go NUCLEAR on it. Kill em all!!!

Code:
for i in 1..100
  $game_screen.pictures[i].erase
end

That would erase ALL your pictures.... including your HUD's weapon system.
nope tried that still nothing I placed it in the scene_battle1 script like last time
Code:
#--------------------------------------------------------------------------
  # * Battle Ends
  #     result : results (0:win 1:lose 2:escape)
  #--------------------------------------------------------------------------
  def battle_end(result)
    # Clear in battle flag
    $game_temp.in_battle = false
    # Clear entire party actions flag
    $game_party.clear_actions
    # Remove battle states
    for actor in $game_party.actors
      actor.remove_states_battle
    end
    # Clear enemies
    $game_troop.enemies.clear
    # my picture erase edit
    for i in 1..100
    $game_screen.pictures[i].erase
    end
    # Call battle callback
    if $game_temp.battle_proc != nil
      $game_temp.battle_proc.call(result)
      $game_temp.battle_proc = nil
    end
    # Switch to map screen
    $scene = Scene_Map.new
  end
change the flat picture to a scripted window for Scene Battle... This way, you can have the window leave once the Battle is over, while maintaining the same level of awesomeness. $game_screen.pictures[x].erase should work for RMXP, are you using a legal english RMXP?
oh I am sorry I solved this on a different forum quite some time ago and forgot to mark this as solved I find when I have a bug it's best to ask the same question on multiple forums so that more than one group look at it fortunately some kind soul on the rpg maker forum took a look at my game and realized the problem was I was using custom scripts I was editing the original battle script but I was using the one player battle script once that was figured that out we just added the erase picture line to the one player script and it worked like a charm thank you for trying to help with such a old post tho :)