Hello, again! I need a little bit of help fixing my Tone Method. It is supposed to change the tone of a map based on a given weather effect.
Here is the method:
As you can see, this method should only do something if @tone_fix is true. Instead of doing what it is told, this method adds -10 (OS::W_Tones[@type] is always -10 in the test) to the base tone (@btone) every frame. This makes the screen go black in about a second and a half. All of the values in array @btone are the red,green,blue,gray values of the default tone respectively.
What is wrong with it? Ive made various edits to the method itself as well as the rest of the script. Nothing changes but the speed at which the damn thing goes black. One attempt to fix this led to no changes in tone at all. Help is much appreciated, thanks.
Here is the method:
Code:
def fix_tone
return if !@tone_fix
for i in 0..@btone.size - 1
@ntone[i] = @btone[i] + OS::W_Tones[@type]
end
tone = Tone.new(@ntone[0],@ntone[1],@ntone[2],@ntone[3])
$game_screen.start_tone_change(tone, 10)
return
end
As you can see, this method should only do something if @tone_fix is true. Instead of doing what it is told, this method adds -10 (OS::W_Tones[@type] is always -10 in the test) to the base tone (@btone) every frame. This makes the screen go black in about a second and a half. All of the values in array @btone are the red,green,blue,gray values of the default tone respectively.
What is wrong with it? Ive made various edits to the method itself as well as the rest of the script. Nothing changes but the speed at which the damn thing goes black. One attempt to fix this led to no changes in tone at all. Help is much appreciated, thanks.