Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Makamura

simple DBS help

Recommended Posts

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...