Makamura 0 Report post Posted September 9, 2012 Hello! I'm new in this forum and I need some help with the RMXP DBS. My question is: "Is there a way to change the screen coordinates of actor's battler sprites?" For example : The x,y of the 1st actor's battler sprite will be loaded from the Game_Variables 1 & 2 Please help,I think this is simple enough... : D Thanks in advance Share this post Link to post Share on other sites
Saltome 16 Report post Posted September 27, 2012 Yep its possible. The question is, what exactly do you want to do with it? Share this post Link to post Share on other sites
Makamura 0 Report post Posted September 28, 2012 Just for a CBS i want to make(with DBS) Details: When the battle starts,1st actor's battle sprite x,y will be loaded from var.1 and 2,2nd actror's from 3 and 4 etc Can you help me make this ? Share this post Link to post Share on other sites
Moonpearl 32 Report post Posted September 28, 2012 One way to do this is to change the Game_Actor's screen_x and screen_y methods. For example if you wish for all actors to read their initial coordinates from variable #1 and #2: class Game_Actor < Game_Battler def screen_x return $game_variables[1] end def screen_y return $game_variables[2] end end If you wish for each of them to read from a different set of variables (for example var #1 & #2 for actor #1, var #3 & #4 for actor #2...): class Game_Actor < Game_Battler def screen_x return $game_variables[1 + @id * 2] end def screen_y return $game_variables[2 + @id * 2] end end If you also want enemies to read from variables the same way, you should put the above in the Game_Battler class instead. And while you're at editing scripts, you can also save your variables for other uses and input constants directly in the screen_x and screen_y methods instead. Share this post Link to post Share on other sites
Makamura 0 Report post Posted September 29, 2012 @Moonpearl Extreme!But...I get an error when i use "return $game_variables[1 + @id * 2]" : undefined method " * " for NillClass Just this fix and everything is fine!! ~Thanks Share this post Link to post Share on other sites
Moonpearl 32 Report post Posted September 29, 2012 Sorry, my bad. Replace @id with self.id and it should be fine. Share this post Link to post Share on other sites
Makamura 0 Report post Posted September 29, 2012 (edited) Thank you MoonPearl! You are a real help! :DD Edited September 29, 2012 by Makamura Share this post Link to post Share on other sites
Makamura 0 Report post Posted September 29, 2012 Everything works just fine! Share this post Link to post Share on other sites