RPG Maker Forums

So I have a plugin that allows actors to stay in place after attacks and not move back to their original home position and with the awesome help of people here, I figured out how to control where people end up based on where they are on the screen based on their coordinates and whatnot. but I've run into a small hiccup that I didn't think about until I started messing around with the idea of characters being anywhere on the battle screen. So... with Yanfly action sequences, you can you stuff like face target and whatnot to face whoever your current target is or face towards/away from your home/starting position in battle. I was wondering tho, is there a way to KEEP that position as long as the game know's you're in a certain spot.

SceneManager._scene._spriteset._actorSprites[0]._homeX tells the game where a said actor's X position is on the screen. and this... $gameTroop.members()[0]._homeX does so for enemy troops. I've been trying to find a way to basically tell the game, if an actor's homeX is less than any troop member's homeX (basically meaning they're on the other side of them... to stay facing that direction. but regardless of what I've tried, the code either doesn't work or they simply turn back around anyways. I'm not very strong with coding, but I'm slowly learning things having explored the forums a ton. but I can't seem to figure out what exact sequence of coding I'd need for this.

if (this.spritePosX() > pointX) {
this.spriteFaceBackward();

I feel like this is what I'm looking for tho... I think my issue is honestly getting this to stick AFTER a turn is over because at that point you no longer have a target... which I THINK is what pointX is representing. If anyone can point me in the right direction, I'd be immensely grateful. thanks everyone!

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top