Crystal animation problem

I'm trying to make an event using Avery's breakable crystals, but I keep running into this problem where a different colored crystal might be shown during part of the shattering animation. And it's kind of random, like it seems whether it changes color or not depends on when it switches from its idle stepping animation to shattering animation (I even attempted adding turn stepping animation off in the move route command but it didn't change anything). I'd really like to have it maintain the same color throughout. Anything I'm doing wrong?
Ok, let's see the sprite sheet.

EDIT: nm, it looks like you have walking turned on, so it's probably just taking random "steps" now and then." Turn off autonomous movement.
Ok, let's see the sprite sheet.
I linked to it - wasn't sure how kosher it was to upload someone else's art, even if free and also from this site.
EDIT: nm, it looks like you have walking turned on, so it's probably just taking random "steps" now and then." Turn off autonomous movement.
Alright, so I tried clicking the walking movement off and did a quick play test, but the problem persists.
There is awkwardness here due to the change in pattern, a.k.a. stepping frame. The intact crystal animates via Stepping, but the breaking crystal animates by turning. So there's no guarantee the pattern will be correct when Change Image is called. Even with Stepping disabled, you'd need to select the correct pattern (middle step in this case) to align with the new image.

Instead, I suggest you just add a new event page for the "breaking" sequence, e.g. a 3-page event:
  1. Replace the current move route with:
    • Self-Switch B = ON.
    • Move Route: This Event (Wait) - Turn Left, Turn Right, Turn Up.
    Keep the Self-Switch A = ON in there too.

  2. New page, condition: Self-Switch B is ON. No commands, no Direction Fix. For its image, select the first frame of the pink breaking crystal.

  3. Probably unchanged? I imagine it's a blank page with Through etc.
There is awkwardness here due to the change in pattern, a.k.a. stepping frame. The intact crystal animates via Stepping, but the breaking crystal animates by turning. So there's no guarantee the pattern will be correct when Change Image is called. Even with Stepping disabled, you'd need to select the correct pattern (middle step in this case) to align with the new image.

Instead, I suggest you just add a new event page for the "breaking" sequence, e.g. a 3-page event:
  1. Replace the current move route with:
    • Self-Switch B = ON.
    • Move Route: This Event (Wait) - Turn Left, Turn Right, Turn Up.
    Keep the Self-Switch A = ON in there too.

  2. New page, condition: Self-Switch B is ON. No commands, no Direction Fix. For its image, select the first frame of the pink breaking crystal.

  3. Probably unchanged? I imagine it's a blank page with Through etc.
Sorry, I'm having a little trouble understanding what should go on which page and when to switch pages. What goes on first page, A on page, and B on page?
I linked to it - wasn't sure how kosher it was to upload someone else's art, even if free and also from this site.

Sometimes people edit stuff, not realizing the importance of the Asset standards. If you ever need to post something that isn't to be distributed, so we can see what you're working with, turn it into a lossy format like JPG and draw a big schmear or some words across it.
Sometimes people edit stuff, not realizing the importance of the Asset standards. If you ever need to post something that isn't to be distributed, so we can see what you're working with, turn it into a lossy format like JPG and draw a big schmear or some words across it.
Understood. I haven't edited it however, it's still as is as Avery posted it.
Ah, OK, so my thinking was:
  • Page 1 (hovering crystal):
    • Conditions: (None).
    • Image: (hovering crystal) - any stepping frame.

      [Edit: actually it looks like, for the stepping frame (a.k.a. pattern) to reset on page change, the selected patterns for the current page and the new page need to be different! So if page 2 uses pattern 1 (middle-step), then page 1 should be pattern 0 or 2 (left- or right-step).]
    • Walking OFF, Stepping ON, Direction Fix ON, Through OFF.
    • Trigger: Action Button.
    • Commands:

      ◆Text:None, None, Window, Bottom : :Attempt to save your progress? ◆Show Choices:Yes, No (Window, Right, #1, #2) :When Yes
      ◆Comment:Visually change to page 2. This page will keep running.
      ◆Control Self Switch:B = ON
      ◆Comment:Do the "breaking" animation (add waits between turns if necessary).
      ◆Set Movement Route:This Event (Wait) : :◇Turn Left : :◇Turn Right : :◇Turn Up
      ◆Comment:When that's done, change to page 3.
      ◆Control Self Switch:A = ON ◆ :When No ◆ :End

  • Page 2 (breaking crystal):
    • Conditions: Self-Switch B is ON.
    • Image: first frame of the "breaking crystal" animation.
    • Walking OFF, Stepping OFF, Direction Fix OFF, Through OFF.
    • Trigger: Action Button (doesn't really matter, this page is only for visuals).
    • Commands: (None).

  • Page 3 (broken crystal):
    • Conditions: Self-Switch A is ON.
    • Image: whatever you like.
    • Probably: Walking OFF, Stepping OFF, Direction Fix ON, Through ON.
    • Trigger: Action Button?
    • Commands: (None, I assume).
The page should change as soon as the self-switch is flipped, allowing a change of visuals before the commands of page 1 end. When the page changes, most of the event's properties are reset to match the new page, working around the differences in pattern, speed, frequency, etc.
Ah, OK, so my thinking was:
  • Page 1(hovering crystal):
    • Conditions: (None).
    • Image: (hovering crystal) - any stepping frame.
    • Walking OFF, Stepping ON, Direction Fix ON, Through OFF.
    • Trigger: Action Button.
    • Commands:

      Code:
      ◆Text:None, None, Window, Bottom
      :    :Attempt to save your progress?
      ◆Show Choices:Yes, No (Window, Right, #1, #2)
      :When Yes
      ◆Comment:Visually change to page 2. This page will keep running.
      ◆Control Self Switch:B = ON
      ◆Comment:Do the "breaking" animation (add waits between turns if necessary).
      Code:
        ◆Set Movement Route:This Event (Wait)
         :                  :◇Turn Left
         :                  :◇Turn Right
         :                  :◇Turn Up
      ◆Comment:When that's done, change to page 3.
      Code:
        ◆Control Self Switch:A = ON
         ◆
      :When No
         ◆
      :End


  • Page 2(breaking crystal):
    • Conditions: Self-Switch B is ON.
    • Image: first frame of the "breaking crystal" animation.
    • Walking OFF, Stepping OFF, Direction Fix OFF, Through OFF.
    • Trigger: Action Button (doesn't really matter, this page is only for visuals).
    • Commands: (None).

  • Page 3(broken crystal):
    • Conditions: Self-Switch A is ON.
    • Image: whatever you like.
    • Probably: Walking OFF, Stepping OFF, Direction Fix ON, Through ON.
    • Trigger: Action Button?
    • Commands: (None, I assume).
The page should change as soon as the self-switch is flipped, allowing a change of visuals before the commands of page 1 end. When the page changes, most of the event's properties are reset to match the new page, working around the differences in pattern, speed, frequency, etc.
Wow, I definitely wouldn't have come up with a sequence like this on my own.
Followed these directions, but surprisingly the problem still persists if you click yes at just the right/wrong moment. Thank you for trying though, it's been appreciated.
Do you still have Walking and Stepping checked?
Do you still have Walking and Stepping checked?
Just for the first page.
Well, page three is Action Button, so maybe set that to Direction Fix. EDIT: Is that blank graphic actually empty or is it part of a sheet?
Well, page three is Action Button, so maybe set that to Direction Fix. EDIT: Is that blank graphic actually empty or is it part of a sheet?
It is blank - it's for after the crystal breaks and there's nothing there.
I haven't had a chance to test, but it might be worth adding a "Wait 1 frame" immediately after turning on Self Switch B, i.e.

... ◆Control Self Switch:B = ON ◆Wait:1 frame ◆Play SE:Crash (65, 130, 0) ...
(Also, you may want to enable Through on page 3. By default events collide with other events unless at least one of them is marked Through ON, regardless of their Priority settings.)
I haven't had a chance to test, but it might be worth adding a "Wait 1 frame" immediately after turning on Self Switch B, i.e.

...
◆Control Self Switch:B = ON
◆Wait:1 frame
◆Play SE:Crash (65, 130, 0)
...

(Also, you may want to enable Through on page 3. By default events collide with other events unless at least one of them is marked Through ON, regardless of their Priority settings.)
Made both changes, wait and through, but the problem is still there.
Wow this is a really tough nut to crack. Thank you so much for trying though!
The intact crystal animates via Stepping, but the breaking crystal animates by turning. So there's no guarantee the pattern will be correct when Change Image is called.

I think this may still be what's breaking it, it's just not clear exactly when the thing occurs.

I wonder if it's worth trying the version with the image change again, instead of the multiple pages.
I did some testing on my end and I believe the below works.

On page 1 use a script in a movement route to force the sprite to pattern 0, 1, or 2 depending on which column you want to use (e.g. 0 for blue, 1 for pink, 2 for green). Have it flick a switch.
1754570198077.png

On page 2, have the breaking animation resolve normally with an autorun. The ◆Control Self Switch:A = OFF at the end is just for testing purposes so that I could spam the space button to see if the flicker would occur.
1754570439730.png

Kind of interesting that the pattern carries over from one event page to the next though...
I think this may still be what's breaking it, it's just not clear exactly when the thing occurs.

I wonder if it's worth trying the version with the image change again, instead of the multiple pages.
I think so too, just not sure what to do about it.
I did some testing on my end and I believe the below works.

On page 1 use a script in a movement route to force the sprite to pattern 0, 1, or 2 depending on which column you want to use (e.g. 0 for blue, 1 for pink, 2 for green). Have it flick a switch.
View attachment 346884
On page 2, have the breaking animation resolve normally with an autorun. The ◆Control Self Switch:A = OFF at the end is just for testing purposes so that I could spam the space button to see if the flicker would occur. View attachment 346885
Kind of interesting that the pattern carries over from one event page to the next though...
This came pretty close! Sadly I was still able to get a color change glitch occasionally, but I really had to spam the action button to see it, like maybe once out of every nine or ten clicks. Still, that's the least often it's shown a different color yet, thank you.
Sadly I was still able to get a color change glitch occasionall
That seems wild so do show screenshots of how you’ve implemented it please? I was hoping it shouldn’t be able to do that with this sequence…
That seems wild so do show screenshots of how you’ve implemented it please? I was hoping it shouldn’t be able to do that with this sequence…
Sure. I added some more stuff I wanted, but it's the same basic command I think - plus I also experimented with it first without the stuff I added and still got it to trigger the glitch/bug.

Original thread: https://forums.rpgmakerweb.com/threads/crystal-animation-problem.179369/