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.

Change battle background, then back again

A change to which background, exactly?

I think this is a skill that's used at various times and on different backgrounds, so you can't specify the exact background to change it back to.

I don't know the answer, though I wonder if there is a script input you can use here. Perhaps someone with more RGSS knowledge could answer :)
 
i found this in a google search it was in the rmxp archives i think

Change the name inside $game_temp.battleback_name to the battleback you want. Store the previous battleback in another variable before making the change, and make a Call Script assigning the new battleback name.
#for example...
$game_temp.battleback_name = "001-Grassland01"
# This is instant, the battleback will change
# at the same time you change the name

Or you can do better than that... Copy and paste this into any script below Game_Temp:
class Game_Temp
def change_battleback(name=nil)
if name != nil
@last_battleback = @battleback_name
@battleback_name = name
else
if @last_battleback != nil
@battleback_name = @last_battleback
end
end
end
end

Call this method passing the new battleback name and it will apply the change. If you want to get back to the previous battleback, just call it without passing nothing. Look:

# Changing battleback (actually 001-Grassland01)
$game_temp.change_battleback("002-Woods01")
# Changing to the previous (actually 002-Woods01)
$game_temp.change_battleback
# Now it?s 001-Grassland01 againYou can make as i did to test it, make a battle event calling this, and you?ll see that the changes are instant. You can trigger it via switchs maybe... I triggered it with turns elapsed.

Is that what you want?

heres a link the the post http://www.rmxp.org/forums/archive/index.php/t-4720.html

any help would be greatly appreciated

--update--

i got it figured out, what i did was put a parallel process on the map that changes a variable ie.

Map_ID = 1 (desert map)
Map_ID = 2 (earth cave)

then in my common event i just created a conditional branch that went like this

if Map_ID == 1 then
battleback = "Desert"
else
if Map_ID == 2 then
battleback = "Earth Cave"
else
end
end

something to that effect anyway

mods can now close this thread unless someone has a cleaner way of doing it
 

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