Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- # Battle Position by Actor ID for Tankentai Sideview
- # v1.0
- # By Mr. Bubble
- # Requested by Aurelia
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- # Allows you to specify actor positions in battle by their actor_id.
- # Keep in mind that for Y-coordinates, lower values move positions UP
- # and higher values move positions DOWN.
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- module N01
- ACTOR_POSITION_BY_ID = {
- # ID [ x, y], <---- (remember the comma after each closing bracket)
- 1 => [415,120],
- 2 => [435,150],
- 3 => [455,180],
- 4 => [475,210],
- 5 => [495,240],
- 6 => [515,270],
- # Add more actor_id => [x,y], below here
- } # <-- Do not delete
- end
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- # - - Do not edit anything below here unless you know what you're doing. - - -
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- $imported = {} if $imported == nil
- if $imported["TankentaiSideview"]
- class Game_Actor < Game_Battler
- alias base_position_by_actor_id base_position unless $@
- def base_position
- # check if id is defined
- if N01::ACTOR_POSITION_BY_ID.key?(self.id)
- # Use coordinates in hash
- base = N01::ACTOR_POSITION_BY_ID[self.id]
- @base_position_x = base[0]
- @base_position_y = base[1]
- # When in Back Attack, invert x-coordinate position
- @base_position_x = Graphics.width - base[0] if $back_attack && N01::BACK_ATTACK
- else
- # else use original method
- base_position_by_actor_id # alias
- end
- end
- end
- end # if $imported["TankentaiSideview"]
Advertisement
Add Comment
Please, Sign In to add comment