1. Dismiss Notice
  2. Within our Resources section we have over 150 Audio files, with room to grow. You may find exactly what you have been looking for. Just CLICK HERE to start your listening adventure.
    Dismiss Notice
  3. Why would you want to upload your resources directly to RMMV.co? It makes it easier for other members to download them. Click HERE for more information.
    Dismiss Notice
  4. Click HERE to see our four new featured resources by TheUnproPro, Starbird, iblamevictoria, and VGM MarkH.
    Dismiss Notice
  5. Here are the The Resource Rules.
    Dismiss Notice
  6. Please read these RULES before posting.
    Dismiss Notice

Need Help: Actor Sprite Location in Battle?

Discussion in 'Javascript Support' started by CT_Bolt, Jan 9, 2019.

  1. #1 CT_Bolt, Jan 9, 2019
    Last edited: Jan 9, 2019
    I could use a bit of help on this one...

    Anyone know how to check X & Y position of the Actor Sprites in that are in battle?

    So far I've got this:

    Code (Javascript):

    Which are found using the properties of the Sprite_Actor Object [Click Here to View Details]


    Which is close but not quite... I'm guessing it's something to do with the Offset or Anchor of the sprites?

    Using this...
    Gives me this...

    Thanks for reading.(cute)
  2. I'm pretty sure you're looking for setActorHome in the Sprite_Actor class, which simply uses setHome in the same class but because setActorHome is called somewhere during battle setup it will overwrite your changes, so you will need to directly change this method to suit your needs.

    Code (Javascript):
    Sprite_Actor.prototype.setActorHome = function(index) {
        this.setHome(600 + index * 32, 280 + index * 48);
    • Informative Informative x 1
    • List

Share This Page