Help with manipulating Character Images

Hello! This is probably a reasonably simple function to do but I'm struggling to find advice covering it and can't figure it out on my own.

This is one of the parts of my Actor's sprite sheet, and changing the character image when scripting a cutscene is simple enough, but it seems to default to the centre column.

Untitled.png


But let's say I specifically want to change my actor's image to the top right sprite of this selection (crest of his jump, mid air, arms down, looking up). In this example I want him to be casting a powerful spell in this cutscene and I'd like him to freeze in this position. Is there a quick way to do it?


I figured maybe the left and right columns relate to "walking" and "stepping" animations respectively so I tried turning stepping animation on, facing the character down, and turning stepping animation off, hoping to freeze him in that pose. But he doesn't - he goes back to the pose shown at the top of the centre column.

Thank you for this! Although I'm still struggling to understand...

I have executed this script in the movement route (2 and 2 for "face down" and "right column" which I figure should give me the top right frame that I want).

Code:
this.setDirection(2); this._originalPattern = 2; this.resetPattern();

I tried removing the reset pattern section just in case it was undoing it somehow but still nothing.

Code:
this.setDirection(2); this._originalPattern = 2;

Untitled.png
Seems to work for me. Show your whole pages without cropping them.

edit: though not like that would probably help here, as long as you're setting the move route on the correct target (which you are, if the other commands are working). did you try it with all your plugins turned off?
Interesting! Hmmm 🙁

Untitled.png


The result of this is that he steps on the tile, he turns down for a second, then changes image to the frame in the red circle, whereas I'm trying to get him to change to the one in the green circle.

Untitled.png


I've played around with the direction and I can get him to turn around with the "this.setDirection(x)" part of the script. The only part that seems to be failing is the "this._originalPattern" part, which is the most important part. No matter what value I input, I'm only getting frames from the centre column of the sprite sheet.

Thank you for your time in helping me look into this!


EDIT: Oh and yes I just tried this with all plugins switched off. I get the same result!
I was doing it with events like in a cutscene. If you want to do it with gameplayer, Caethyril has a method for it here, I think (follow the link):

I was doing it with events like in a cutscene. If you want to do it with gameplayer, Caethyril has a method for it here, I think (follow the link):



PERFECT! I didn't realise there was a limitation around the Player for this command. I just used Caethyril's plugin and it works perfect.

Thank you so much!

And thank you, @caethyril - incidentally, as a Welshman, your username is tripping my Welshdar. Are you, perchance...?
Yay! Direct quote so future readers can avoid clicking through 2 links:
By default only events reference _originalPattern. Other characters just reset to pattern 1, i.e. "middle".

This little plugin may help (untested):
Spoiler: plugin code
JavaScript:
/*:
 * @target MZ
 * @plugindesc Permit use of _originalPattern for non-event characters.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/159233/
 * @help Free to use and/or modify for any project, no credit required.
 */
void (alias => {
  Game_CharacterBase.prototype.isOriginalPattern = function() {
    if ("_originalPattern" in this)
      return this.pattern() === this._originalPattern;
    return alias.apply(this, arguments);
  };
})(Game_CharacterBase.prototype.isOriginalPattern);

void (alias => {
  Game_CharacterBase.prototype.resetPattern = function() {
    alias.apply(this, arguments);  // better odds of cross-compatibility
    if ("_originalPattern" in this)
      this.setPattern(this._originalPattern);
  };
})(Game_CharacterBase.prototype.resetPattern);
I.e. check and reset to _originalPattern if that is defined.

(@Cid - as far as I'm aware, I don't know a word of Welsh. I'd guess you're just seeing my mild interest in etymology~)
(@Cid - as far as I'm aware, I don't know a word of Welsh. I'd guess you're just seeing my mild interest in etymology~)


My instinct on seeing your name was that it was a combination of Caer and Mythril, i.e. Mythril Fortress or something to that effect

Whether that was intentional or not, it piqued my interest!

EDIT: and I'm only just NOW noticing the y and r are other way around so it's probably nothing to do with Mythril xD

Original thread: https://forums.rpgmakerweb.com/threads/help-with-manipulating-character-images.175868/