Skip to content

Feature: Add offset_x property to Game_Character/Game_Event/Game_Player

Rey requested to merge TheRey/pokemonsdk:demo/offset_x into development

WARNING

  • To ensure anyone can test without Studio 2.0, this MR has been made from the PSDK .26.20 commit. Please make sure to NOT rebase the branch until the merging can be done (after the code review and tests)

MR Description

  • This MR adds the offset_x to the Game_Character class (so Game_Event and Game_Player also profit from it). This addition is basically the same thing as the offset_y feature already present in PSDK, and works about the same.
  • Game_Event gains a name tag which allows to change the offset_x: [offset_x=nb]
  • Game_Player also gains the $game_player.offset_x = nb command.

Tests to realize

  • Create an event with the name tag [offset_x=32] (or any number) in its event name: its sprite's initial position should be shifted horizontally by the number of pixels given in the name tag
  • Use the $game_player.offset_x = 32 (or any number) command: the player's sprite's current position should be shifted horizontally by the number of pixels given in the name tag, and the camera should move along the player's sprite

Merge request reports