Help - Search - Members - Calendar
Full Version: Character Sprite aligner
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
Tawa_Hoda
Does anyone know how to make a small script that if your Charset's sprite has something the makes the forward part of it's character to far back, you can the make the image go forward a couple of pixels forward it make it stand in the spot it should be?

And if up in placement of this like a normally do, please put this in the right place.
Thanks in advance,
Tawa Hoda
Night_Runner
Hmmmmm, well, there's a couple of things you can do smile.gif

Firstly, when you use a character in RMXP, it splits the image into a 16 images (4x4, 4 facing down, 4 facing left, 4 facing right, 4 facing up).
What can do with this is take the picture into paint, make the canvas bigger vertically, move all the pictures to be evenly spaced apart, and move the up-facing pictures up a bit (with the extra room you just made), which would do the trick (or vice versa).


Otherwise you'd need to script a bit:

In the script editor (Tools > Script Editor), on the left window select Sprite_Character, scroll down, and insert the lines with a red box around it
[Show/Hide] bit code at the bottom
CODE
# Start Changing oy
        if @character.direction == 8
          if @character.character_name == '001-Fighter01'
            self.oy -= 10
          elsif @character.character_name == '002-Fighter02'
            self.oy -= 10
          end
        end
        # End

change that 001-Fighter01 to the sprite you're after, and the -= 10 to how many pixels you want to move.
If you want to have more characters, use the elsif, like I have with 002-Fighter02 smile.gif
and the character.direction == 8 means up (it's taken off the numpad, 2 = down; 4 = left; etc)

That anything like you were after?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.