MV change Enemy Sprite Priority during YEP action sequences?

catwizard69

Villager
Member
Joined
Jul 27, 2018
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMMV
I'm using Yanfly's action sequences as well as Yanfly's animated enemies. I'm trying to get the enemy Sprite to take priority over the actor when it attacks, since it looks weird when the enemy sprite goes under the actor when it goes to attack. Does anyone know of a command for that action sequences I can toggle which has priority?
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
520
Reaction score
137
First Language
English
Using YEP Battle Engine Core?

Look under the 5th topic: "Sideview"

Under there is an option regarding Priority.
 

catwizard69

Villager
Member
Joined
Jul 27, 2018
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMMV
Using YEP Battle Engine Core?

Look under the 5th topic: "Sideview"

Under there is an option regarding Priority.
Yes, I am, but I am looking for a way to change that depending on who's attacking who.
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
520
Reaction score
137
First Language
English
Did you try the different priority options?
 

catwizard69

Villager
Member
Joined
Jul 27, 2018
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMMV
I did, and all options seem to only give one side priority at all times.
 

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
181
Reaction score
27
First Language
English
Primarily Uses
RMMV

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
181
Reaction score
27
First Language
English
Primarily Uses
RMMV

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
181
Reaction score
27
First Language
English
Primarily Uses
RMMV

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
520
Reaction score
137
First Language
English
Maybe you need to request a plugin.
 

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
181
Reaction score
27
First Language
English
Primarily Uses
RMMV
No idea how to change it manually in an action sequence but if you want always attacker on top of everything.

Code:
Spriteset_Battle.prototype.battleFieldDepthCompare = function(a, b) {
var priority = BattleManager.getSpritePriority();
if (a._battler && b._battler) {
if (!$gameSwitches.value(1)) {
if (a._battler.isActor() && b._battler.isEnemy()) return 1;
if (a._battler.isEnemy() && b._battler.isActor()) return -1;
} else {
if (a._battler.isActor() && b._battler.isEnemy()) return -1;
if (a._battler.isEnemy() && b._battler.isActor()) return 1;
}
}
if (a.z < b.z) return -1;
if (a.z > b.z) return 1;
if (a.y < b.y) return -1;
if (a.y > b.y) return 1;
return 0;
};
and run a check at beginning of every skill for the switch.

if user.isEnemy()
CHANGE SWITCH 1: on
else
CHANGE SWITCH 1: off
end

Put it below battle engine core.
Battle engine core also without said plugin lets you choose between actors or enemy on top or normal which is only based off position, I think it defaults to actors on top, so try switching to 0 first and see if that is better in side view sprite priority.
Found it, credit @glaphen
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

BCj
Gotta love some gossip :D
Please do not buy games from g2a.com. The sellers have total power over you. The website has many scam sellers. It looks cheap, but the key code didn't work.
A while back I was having fun making my own custom tiles, then I hit carpet... why is it so difficult!? Lol.
Weekend is finally here... what would you like to see (?):
1) Pokemon into zelda minish-cap style
or
2) Pokemon into zelda gbc style
or
3) Zelda into pokemon style

#= Choose ===============#
||__[ Full mockup ]_[ Charset ]__||
#=======================#

Forum statistics

Threads
97,946
Messages
948,073
Members
129,196
Latest member
Sharyun
Top