Hello everyone I have a little problem in the construction of my script I created a theme script who you can change of ''image theme'' with a script call like season
here the portion I wanted to change via a script call
=begin
tale of season Theme title screen
can be called by for change theme via the game
SceneManager.call(seasonTheme)
=end
module Season
Season_Theme = 'winter'
TRANSITION_DURATION = 10
Season_Scroll_Background = [ 1, 0 ]
end
How I can call a script call who permit to change the ''theme'' in the middle of a game?
i am really thankfull if you can help me
I suggest using a HASH for both duration and scroll, using season strings ("Winter","Spring") etc as key then on your scene's start, make it fetch the correct data depending on the theme passed to it
Hoo okai like this ?
Season = [ blabla ...ect]
After how exemple in a some part of the game it will change ?
because i want to be able to change it with script call...
I hope I am readable ._.'
module Season TRANSITION_DURATION = { "Winter" => 10, "Spring" => 11, } SCROLL_BACKGROUND = { "Winter" => [0,1], "Spring" => [0,2], }endso if you want spring theme's transition, then you'd just need to doSeason::TRANSITION_DURATION["Spring"]
That Season_Theme = 'winter', 'Spring', 'Fall', 'Summer' is so wrong... it seems like an array, but you didn't enclosed it in []
and you don't even need that as far as I'm concerned...
Also where does Scene_Title call main??? the start method of all scenes is called start...
then since you turned it into a hash, you should supply the hash key so it would now be
TRANSITION_DURATION[@season]
but then you still need to define the @season correctly...
@season = "Spring" if @season.nil?
if you want it to be spring by default...
to change it in-game you might wanna just use a global... so use like $season
so that in-game you can just use a script call: $season = "Winter" for example
then change the @season = something on your scene_title into
$season = "Spring" if $season.nil?
and of course, anything else that uses @season should be changed to $season
Wow Sankyou! sorry is a a old script i rebuild for now ...I never thinked to that...sorry I seem noob but is rare I used the Script call...
yeah, it does seem to need a rebuild... though if you need the theme change to stay even after you close the game, you need to save it onto an external file...
Hum I remember I can create a data but is how to save it in a external file I don't really remember...
you could use my Custom Game Data script I think...