zerobeat032

Oh, it's that Zerobeat kid...
Veteran
Joined
Mar 28, 2014
Messages
415
Reaction score
781
First Language
English
Primarily Uses
RMMV
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!
 

Mojo907

Veteran
Veteran
Joined
May 21, 2013
Messages
171
Reaction score
39
First Language
English
Primarily Uses
RMMV
would be cool, perhaps someone will figure this out.
 

Latest Threads

Latest Profile Posts

gotta love when a plugin you thought had nothing to do with why something else wasn't working winds up being the issue...
Doing RPG Maker News for 26th September 2021

Well... it's been a while since I was last here :kaoswt: I don't want to say I'm officially 'back' yet, but I've recently started working with RM again, so I might become active here again :kaohi:
Mmmm I love Coca Cola candy! :kaoluv:
aaaand my power is out. I sometimes think that I'm cursed.

Forum statistics

Threads
115,390
Messages
1,089,528
Members
150,124
Latest member
galenus_3d
Top