As a test (it was even worst in my main project), I included this simple script in a new project.
I then create an event doing the following :
Now for the execution
- First time I trigger the even,the scene appear
- When I choose an option... no soucd
- Second time I trigger the event, I hear the sound corresponding to the previous choice, and the scene appears.
- When I choose an option,still no sound
- And so on...
It seems as if the Script and the Condition where run on parrallell processes, or some part of the Event Command where frozen , or... I still don't understand.
Any lead ??
Ah... and... I still don't know how to set a title for the spoiler thing
Code:
class TTestClass
attr_accessor :bool_value
def initialization
@bool_value = false
end
end
$testobject = TTestClass.new
class TScene_Test < Scene_Base
def start
super
Sound.play_decision
create_menu_background
@win_cmd = Window_Command.new(136,["set to true","set to false"])
end
def terminate
@win_cmd.dispose
dispose_menu_background
super
end
def update
super
update_menu_background
@win_cmd.update
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
end
if Input.trigger?(Input::C)
case @win_cmd.index
when 0
$testobject.bool_value = true
when 1
$testobject.bool_value = false
end
$scene = Scene_Map.new
end
end
end
I then create an event doing the following :
Script:$scene = TScene_Test.new
condition: Script: $testobject.bool_value
Play SE 'Applause'
else
Play SE 'Buzzer1'
End of Condition
condition: Script: $testobject.bool_value
Play SE 'Applause'
else
Play SE 'Buzzer1'
End of Condition
Now for the execution
- First time I trigger the even,the scene appear
- When I choose an option... no soucd
- Second time I trigger the event, I hear the sound corresponding to the previous choice, and the scene appears.
- When I choose an option,still no sound
- And so on...
It seems as if the Script and the Condition where run on parrallell processes, or some part of the Event Command where frozen , or... I still don't understand.
Any lead ??
Ah... and... I still don't know how to set a title for the spoiler thing