Help with mirror bug

0 favourites
  • 7 posts
From the Asset Store
Sync animations, animation frames, mirror state, sounds and anything else using these methods.
  • I've been having trouble fixing the following bug.

    Basically when running past the enemies of type c (the ones with the gas mask and bag) their equipment doesn't mirror with them at the same time. It's as if there's a delay. I spent a lot of time troubleshooting this issue, but I haven't been able to fix it. I was hoping I could get some help from the community.

    YouTube video: youtu.be/RHV6CCuYMqI

    c3p: dforms.ca/mgc/MGC-v41.c3p

    The game: dforms.ca/mgc

    Thank you!

    Edit:

    i = inventory (drag and drop)

    r = reload

    z = crawl

    x = crouch

    f = cqc

    shift down = walk

    ctrl down = crouch

    right click = use item

    space = jump

    esc = menu (for now it's just a dev menu)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It's because you're making use of mirror and also have animations for right and left, this doesn't make much sense. You should have one idle and one walk animation and mirror the object only. When you change animations but also mirror, it moves the image points to the opposite side which only affects the C equipment and what is happening here. So what you're seeing is a left animation that looks left, then a mirrored right animation that looks left but has the image points in the same place so the pinned objects will appear on the wrong side.

  • Awesome, thank you Lions! I will apply does changes tonight when I get the chance. Appreciate the help.

    Edit:

    I have the animations Walk_Left and Walk_Right cause the animations are different. Maybe if I flip the Walk_Left and cancel the mirror.

    Edit 2:

    I'm making progress!

    Edit 3:

    Nop, dead end.

  • Ok , I fixed it. It was a lot simpler than I thought. Took me forever, but it was such an easy fix... Anyways, I ended up not flipping the animations and leaving them as is. I got it working properly just by adding NPC_Soldier.X > Player.X (Idle_Left_Scanning) or if NPC_Soldier.X < Player.X (Idle_Right_Scanning).

    The issue was that the NPC of type C would mirror, but the gas mask and bag wouldn't if the player stayed next to the NPC. I have so many conditions that there must be a conflict somewhere idk. I'm planning on doing some more digging.

    I'm still new to Construct and I have much to learn. But overall, do you have any thoughts on how I built my project so far? I now it's not perfect. I've been learning as I build.

    Again, thank you for your help.

  • Ah I see so the animations for left and right are different. Due to this I guess you drop mirror and just set animation. You can flip the left ones in the image editor. Then just make sure image points are correct across all animations. I saw you had a lot of mirror events, in my experience too many can cause bugs further down the line with many enemies on screen. You may come across some bugs later on with enemies acting strangely.

  • Wouldn't not using mirror on the NPC cause problems with the LOS?

  • I guess so, it needs to face the right way. You'll have to use both then.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)