One method that can be really handy for diagnosing these kinds of problems is to create a Text object, and then create an event inside the loop to print debuging info into that Text object.
e.g.
Insert the following event as a sub-event of the
"Segments.ImagePointCount = 2", and
"Segments.ImagePointCount = 3".
Event:
* Compare ( loopindex >= 0 )
* Compare ( loopindex <= 3 )
// This event will run 4 times, for the loop indexes 0, 1, 2, and 3.
Actions:
* Append text ( " Loopindex:" & loopindex )
* Append text ( " SegUID:" & Segments.UID )
* Append text ( " platUID:" & PlatformCollision.UID )
* Append text ( " plat2UID:" & PlatformCollision2.UID ) // Only needed for count = 3
* Append text ( " Seg.ImgPtX1" & Segments.ImagePointX(1) )
* Append text ( " Seg.ImgPtY1" & Segments.ImagePointY(1) )
* Append text ( " Seg.ImgPtX2" & Segments.ImagePointX(2) ) // Only needed for count = 3
* Append text ( " Seg.ImgPtY2" & Segments.ImagePointY(2) ) // Only needed for count = 3
* Append text ( " Seg.Col:" & Segments.Collision)
* Append text ( newline )
The "newline" at the end will make each loop iteration print out on it's own line.
Be sure to use "Append text" and NOT "Set text".
Note that some of the actions in the above event only apply to the case where "Segments.ImagePointCount = 3", and not when it "= 2". For the "= 2" case, you can remove all the actions that are commented "// Only needed for count = 3".
You'll probably have to stretch out the text object so that it has room to display multiple lines.
You may also want to set it's font size to something, small like 8 point, and set it's initial text to be blank.