Merge Block IsConnected in Programmable Block returns true on yellow state

Iceac Sarutobi shared this bug 5 years ago
Reported

The IsConnected method of the IMyShipMergeBlock interface returns true on yellow state.

But IsConnected should return true only in green state.

Replies (12)

photo
1

Hello, Engineer!


Thank you for your feedback! Your topic has been added between considered issues.

Please keep voting for the issue as it will help us to identify the most serious bugs.


We really appreciate your patience.


Kind Regards

Keen Software House: QA Department

photo
1

Any update on this issue? Monumentally infuriating trying to script with merge blocks at the moment

photo
1

The problem still exists

photo
1

If this is fixed, please consider allowing the information about yellow state of merge block to be accessible as well, as some clang drive scripts rely on that input.

photo
1

Hi, an possible solution are make an equivalent enum like "MyShipConnectorStatus"

Thanks for yours works :)

photo
1

I just got bit by this bug. Tried to make a mining piston that could build its own track to move forward. It shouldn't advance until merged but now it does and stalls when things don't line up properly later. Said script works perfectly in ideal conditions though so the yellow = merged bug is the root of my issue.

photo
1

was using sensons till now , somehow i stumbled upon the "IsConnected" prop, got excited for nothing :(

photo
1

I stumbled upon this issue as well, but because of how the merge block works it was pretty easy to solve in another way by simply checking if they are members of the same CubeGrid. This should only be true while they are merged.

if (mergeBlockA.CubeGrid == mergeBlockB.CubeGrid) {
    // do something when they have been properly merged
}

photo
1

Just stumbed on this one. Pretty anoying as my script was supposed to fire once grids merge, and it activates way too early.

photo
1

Also just stumbed on this 'feature' :( at least this forum entry had a solution after little tweak looks like this:


 public static class MyShipMergeBlockExtensions {
        public static bool IsMerged(this IMyShipMergeBlock mergeBlock) {
            //Find direction that block merges to
            Matrix mat;
            mergeBlock.Orientation.GetMatrix(out mat);
            Vector3I right1 = new Vector3I(mat.Right);

            //Check if there is a block in front of merge face
            IMySlimBlock sb = mergeBlock.CubeGrid.GetCubeBlock(mergeBlock.Position + right1);
            if (sb == null) {
                return false;
            }

            //Check if the other block is actually a merge block
            IMyShipMergeBlock mrg2 = sb.FatBlock as IMyShipMergeBlock;
            if (mrg2 == null) {
                return false;
            }

            //Check that other block is correctly oriented
            mrg2.Orientation.GetMatrix(out mat);
            Vector3I right2 = new Vector3I(mat.Right);
            return right2 == -right1;
        }
    }

photo
1

Hello!


Thank you for letting us know that this is still an issue. Could you please provide us with an example script or a blueprint where this issue occurs? We would really appreciated because it would make easier for us to report it.


Thank you.


Kind Regards

Keen Software House: QA Department

photo
1

This happens with every script.

Easiest way to test would be a wall with a merge block facing left and a merge block facing right being pushed along the face of the wall towards the other merger. As soon as the merging faces even slightly overlap an the block turns yellow(meaning "in range") the method will return TRUE. It should only do this when the blocks are green aka connected.

photo
photo
1

Hello, All!

Thank you for letting us know about this issue. This has been reported internally.

Kind Regards

Laura, QA Department

Leave a Comment
 
Attach a file