Hi, im having a extrange problem with scripts. I created my own project for testing. I added for testing the problem this code in GS:
Note that this script is a test one.
Then i create a new project with a event in automatic that calls this script:
$game_system.set
And desactives himself using selfswitch.
With this, the problem, is that the game freezes and i never can freely move the character, when using the set metod. Note that if i modify the variable in the script call it gives the same problem.
Well, that dont have any sense, but if i uncoment the two p phrases, the game works well, and later of the text i can move character freely.
And if i just let the first testing phrase, its printed in a never ending loop. And if i only let the second one, it works well.
Pd: if you dont understand something, just ask
Code:
class Game_System
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :ib_first_initialize # tileset file name
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias wep_gs_ib_init initialize
def initialize
wep_gs_ib_init
@ib_first_initialize = true
end
def set
#p 'before set'
@ib_first_initialize = false
#p 'after set'
end
end
Then i create a new project with a event in automatic that calls this script:
$game_system.set
And desactives himself using selfswitch.
With this, the problem, is that the game freezes and i never can freely move the character, when using the set metod. Note that if i modify the variable in the script call it gives the same problem.
Well, that dont have any sense, but if i uncoment the two p phrases, the game works well, and later of the text i can move character freely.
And if i just let the first testing phrase, its printed in a never ending loop. And if i only let the second one, it works well.
Pd: if you dont understand something, just ask