Conditional by Actor Sprite

Hi, I've been testing different conditionals with the actors, the conditional by Actor Faces has really helped me a lot
Code:
$game_actors[x].face_name == "FileName" && $game_actors[x].face_index == "Index"

but, I would like to know if the same can be done but with the actors' sprites.
I've tried something simple like:
Code:
$game_actors[X].character_name == "FileName" && $game_actors[X].character_index == "Index"

But they have not worked. especially the "character_index" that I tried the same with variables and it has not worked.
How could it make it work?
A cobbled together solution would be to change the actor, and have multipule copies of the same actor with different graphics. Then, you'd only need to test for the actor
I think it should have worked... For starters, maybe try checking the actual value of those properties first...

Do this on a script call before your check

Code:
p $game_actors[x].character_name
p $game_actors[x].character_index

Then test your game with the console on, and see the value that gets printed. This will help you know why the condition doesnt work.
I think it should have worked... For starters, maybe try checking the actual value of those properties first...

Do this on a script call before your check

Code:
p $game_actors[x].character_name
p $game_actors[x].character_index

Then test your game with the console on, and see the value that gets printed. This will help you know why the condition doesnt work.

Mmmm .. I made a script call with the code you gave me, but the name of the actor does not change in the console, and the Index only remain at 0.
What is the exact message you see in the console?

Can you also post a screenshot of your actual event commands?
What is the exact message you see in the console?

Can you also post a screenshot of your actual event commands?

Oh, I think I already solved the problem, I think the conditional does not detect the actor's file name or the Index through "Set Move Route".
but if you change the values when make with the "Change Actor Graphic" button

well I think it turned out, thanks for the help c:
Thats weird... Using the change graphics inside move route should reflect on the properties because the engine uses only those properties to display the correct sprite. So if the sprites are changing in-game, the properties should also be changing...
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/conditional-by-actor-sprite.114481/