PROBLEM SOLVED! Changing enemy image in battle

cif140

Villager
Member
Joined
Apr 18, 2018
Messages
12
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hello.

PROBLEM:
I’m stuck and can’t figure out how to change an enemy’s image during battle. I don’t want the enemy to transform, just look different and retain all stats, skills, current hp, etc.

GOAL:
I have an enemy that I want to be in a certain pose to indicate he will use a heavy damage attack in two turns. Visual cue for the player.

WHAT I’VE TRIED:
The enemy uses a skill that gives him a “Watch Out!” State. I tried to change the enemy’s opacity to 0% in the skill's action sequence and then use a visual state effect battle animation as the new image/pose. But since I decreased the enemy’s opacity to 0%, the animation also decreases to 0%. It seems they are linked. Here is what I have in the notetags for the skill and state:


"Watch OUT Skill"

<setup action>
display action
immortal: targets, true
</setup action>
<target action>
zoom: 200%, 20
camera screen: user, front center, 20
camera focus: user, front center, 20
wait: 30
action effect
opacity user: 0%, 0
</target action>

// Follow: Apply Jump state to user.
<Follow Action>
add state 30: user
</Follow Action>



=================================


"Watch Out State"


<State Animation: 151>

// Buffs & States Core
<Custom Leave Effect>
// Get the landing skill.
var skill = 81;
// Get the last targeted index.
var target = -2;
// Queue the forced action.
BattleManager.queueForceAction(user, 81, target);
</Custom Leave Effect>


Functionally, the skill/states work. But the enemy is invisible while the state is applied.

WHAT I’M USING:
I’m using up to date MV. Using multiple Yanfly scripts. Particularly Action Sequences, buffs/states core, visual state effects. No error messages or anything.

How can I accomplish this using Yanfly’s scripts?
 
Last edited:

cif140

Villager
Member
Joined
Apr 18, 2018
Messages
12
Reaction score
1
First Language
English
Primarily Uses
RMMV
Anyone able to help with this? Thanks!
 

Crusha

Veteran
Veteran
Joined
Jul 28, 2020
Messages
56
Reaction score
25
First Language
English
Primarily Uses
RMMV
Depending on what sprite you're using, for example, if it's a SV enemy that utilizes the sprite-sheet the same as actors, there are sprites on the sheets that are reserved specifically for the wait-time until a spell is cast, meaning you could make whatever you wanted the sprite to be, and put it in that location on the sprite-sheet (assuming it is within the pixel bounds). If it's not the SV image like this, but instead a picture like in the enemies folder, ok.

You mentioned using opacity -- have you considered setting enemy transparency to ON, instead of opacity to 0?
 

cif140

Villager
Member
Joined
Apr 18, 2018
Messages
12
Reaction score
1
First Language
English
Primarily Uses
RMMV
Depending on what sprite you're using, for example, if it's a SV enemy that utilizes the sprite-sheet the same as actors, there are sprites on the sheets that are reserved specifically for the wait-time until a spell is cast, meaning you could make whatever you wanted the sprite to be, and put it in that location on the sprite-sheet (assuming it is within the pixel bounds). If it's not the SV image like this, but instead a picture like in the enemies folder, ok.

You mentioned using opacity -- have you considered setting enemy transparency to ON, instead of opacity to 0?
Thanks for the reply! As of now it is not an SV battler, just a static enemy image. Can you give me an example of how to change the transparency? In the notebox?
 
Last edited:

woop

Freelance Illustrator
Veteran
Joined
Apr 13, 2016
Messages
44
Reaction score
84
First Language
English
Primarily Uses
RMMV
Hello.

PROBLEM:
I’m stuck and can’t figure out how to change an enemy’s image during battle. I don’t want the enemy to transform, just look different and retain all stats, skills, current hp, etc.

GOAL:
I have an enemy that I want to be in a certain pose to indicate he will use a heavy damage attack in two turns. Visual cue for the player.

WHAT I’VE TRIED:
The enemy uses a skill that gives him a “Watch Out!” State. I tried to change the enemy’s opacity to 0% in the skill's action sequence and then use a visual state effect battle animation as the new image/pose. But since I decreased the enemy’s opacity to 0%, the animation also decreases to 0%. It seems they are linked. Here is what I have in the notetags for the skill and state:


How can I accomplish this using Yanfly’s scripts?
Using Yanfly's Action Sequences and Yanfly's Weak Enemy Poses, you can get enemies to do custom poses in battle. (This only works for static sv_enemies) Use this in the enemy note tag:

<Custom Enemy Pose>
if (user.isStateAffected(X)) {
name = 'Enemy Pose 2';
} else {
name = 'Enemy Pose 1';
}
</Custom Enemy Pose>

*Edit: You'll need to create a dummy state in the database for this custom pose, it can be any number.

Then, you'll need to use 'add state X: user' when action sequencing the enemy's attack, and use 'remove state X: user' to get the enemy back to its default pose when it's done with the attack.
 

cif140

Villager
Member
Joined
Apr 18, 2018
Messages
12
Reaction score
1
First Language
English
Primarily Uses
RMMV
Using Yanfly's Action Sequences and Yanfly's Weak Enemy Poses, you can get enemies to do custom poses in battle. (This only works for static sv_enemies) Use this in the enemy note tag:

<Custom Enemy Pose>
if (user.isStateAffected(X)) {
name = 'Enemy Pose 2';
} else {
name = 'Enemy Pose 1';
}
</Custom Enemy Pose>

*Edit: You'll need to create a dummy state in the database for this custom pose, it can be any number.

Then, you'll need to use 'add state X: user' when action sequencing the enemy's attack, and use 'remove state X: user' to get the enemy back to its default pose when it's done with the attack.
Using Yanfly's Action Sequences and Yanfly's Weak Enemy Poses, you can get enemies to do custom poses in battle. (This only works for static sv_enemies) Use this in the enemy note tag:

<Custom Enemy Pose>
if (user.isStateAffected(X)) {
name = 'Enemy Pose 2';
} else {
name = 'Enemy Pose 1';
}
</Custom Enemy Pose>

*Edit: You'll need to create a dummy state in the database for this custom pose, it can be any number.

Then, you'll need to use 'add state X: user' when action sequencing the enemy's attack, and use 'remove state X: user' to get the enemy back to its default pose when it's done with the attack.
This is what I needed! Thanks!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Just got two Switch E-Shop 20$ gift cards... Is 3D All-Stars worth it? Or should I get something like Celeste? I'd love to know your opinion!
I’m looking at the MZ full body images and I think Priscilla is taller than Reid...
Ami
--- Music Selection ---

M.Archer: It's Music Station,You can Change the Music as you like.
F.Healer: i want to hear the Romantic Music.
M.Fighter: Then,i want the Hard-Rock one!
(the Troll Song has played)
M.Archer: Hey,i hear this Music.
F.Healer: It's popular from Internet Music,i wonder who change it?
Hero: I change it.
Entire Party: YOU????
Had a soda for the first time in two months at my nephew's birthday party...it's amazing how once you are no longer addicted to soda, they actively taste like poison when you try to drink them. Couldn't even finish it.

Forum statistics

Threads
103,040
Messages
996,888
Members
134,514
Latest member
TheGeneral50
Top