Bug when pawn overlaps actor it activates wrong actor

Hello! Have issue when pawn (sphere) overlaps another actor with trigger box (small blue sphere) and next such actor needs to be activated and overlapped with next pawn.

Actors with trigger box spawn in rows and I put them in array of actors. Trigger box checks through boolean variable. Bottom row has boolean with true variable and others with false. And when one of the bottom row is overlapped by pawn it stops this (current) pawn, spawns next pawn and should activate higher actor with box on one position.

I take current actor from array, do +5 in index to find next such actor in array and activate it. After one activation it activates from the top row insted of +1 row and causes bug. Please help me figure out what am I doing wrong.

1


I’m not seeing an obvious culprit, but there’s likely not enough of your code here to figure this out. I’d suggesting adding some breakpoints and/or logs/prints to ensure your variables match what you expect, then step through the BP to validate. E.g. Index Of Break Point might be a good one to track.

Hello. In actor BP “spawnpoint” array and spawn of actor “breakpoint” defined. And “breakpoint” has ActorBeginOverlap and also tried through ComponentBeginOverlap and when pawn “gameObject” overlaps it next “breakpoint” on 1 up row should be activated but happens this: added printstring. Numbers around actors breakpoint are their indexes.

Happens next: first time works fine but on 2nd overlap it activates wrong not by 1 up but at the top. And I dont know the reason why. 4th pawn just collides with 3rd.

Here is how I spawn and add to array breakpoints

Game object actor didnt had time to initialize, so moving spawn point to give mre time solves the bug.