- Joined
- Aug 13, 2015
- Messages
- 41
- Reaction score
- 1
- First Language
- Romanian
- Primarily Uses
I am using a code in the materials section to make sure that the first 5 variables in my project are set when the game starts. This is my code:
class << DataManager alias :some_random_alias_init :init def self.init some_random_alias_init $game_variables[1] = 0 $game_variables[2] = -150 $game_variables[3] = -125 $game_variables[4] = 300 $game_variables[5] = 275 endend(code provided by KockaAdmiralac_FINALLY)
it works, the variables are set when the game starts ... but I discovered another problem.
I'm not sure if this counts as a question about scripting, but the reason I need those variables set when the game starts is because I'm using them for my portrets(they represent the drawing positions for the show_picture command). With this script the variables are changed(I press F9 and I can see they are changed) but the pictures are not drawn on the right positions.
In the Show Picture window I have the Display Position set to Variable, and there I set the variables that I need (In most cases x = game_variables[3] and y = game_variables[1])
I press F9 and game_variables[3] is set to be -125 but the X position in which the image is shown is 0...
I really don't know what to do about this ...
class << DataManager alias :some_random_alias_init :init def self.init some_random_alias_init $game_variables[1] = 0 $game_variables[2] = -150 $game_variables[3] = -125 $game_variables[4] = 300 $game_variables[5] = 275 endend(code provided by KockaAdmiralac_FINALLY)
it works, the variables are set when the game starts ... but I discovered another problem.
I'm not sure if this counts as a question about scripting, but the reason I need those variables set when the game starts is because I'm using them for my portrets(they represent the drawing positions for the show_picture command). With this script the variables are changed(I press F9 and I can see they are changed) but the pictures are not drawn on the right positions.
In the Show Picture window I have the Display Position set to Variable, and there I set the variables that I need (In most cases x = game_variables[3] and y = game_variables[1])
I press F9 and game_variables[3] is set to be -125 but the X position in which the image is shown is 0...
I really don't know what to do about this ...
