Game Dev Contest
Join in on the Game Development contest with over $300 in prizes!
Banner Creation Contest!
Help the community out by creating your own version of the banner, and potentially having that as the main banner!
Resources
Check out our resources :D
Upgrade your account
Help out the community, and keep the website running and fully up to date by donating! :D

Need Help: Actor Sprite Location in Battle?

GO TO ADMIN PANEL > ADD-ONS AND INSTALL ABSTRACT SIDEBAR TO SEE FORUMS AND SIDEBAR

CT_Bolt

Global Moderator
Staff member
Resource Team
Joined
Nov 12, 2015
Messages
552
Points
248
RM Skill
Programmer
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
Joined
Oct 6, 2015
Messages
2,741
Points
626
RM Skill
Programmer
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