Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Need Help: Actor Sprite Location in Battle?

CT_Bolt

Global Moderator
Staff member
Resource Team
Xy$
0.02
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:

JavaScript:
BattleManager._spriteset._actorSprites["0"]._homeX
BattleManager._spriteset._actorSprites["0"]._homeY
Which are found using the properties of the Sprite_Actor Object [Click Here to View Details]

upload_2019-1-9_12-19-52.png
upload_2019-1-9_12-25-34.png

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

Update:
Using this...
upload_2019-1-9_14-25-24.png
Gives me this...
upload_2019-1-9_14-27-13.png

Thanks for reading.(cute)
 
Last edited:

LTN Games

Master Mind
Resource Team
Xy$
0.01
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.

JavaScript:
Sprite_Actor.prototype.setActorHome = function(index) {
    this.setHome(600 + index * 32, 280 + index * 48);
};
 
Top