In these types of games, it seems that the players move and the camera moves until they get to some enemies then the camera stops, and it locks down. After the enemies are dispatched, what I am calling the “notifier” appears somewhere on the screen in what usually seems to be a pointing hand a long with an audible “bling bling bling” sound to indicate it is time to move on. (And if you did not this usually meant some type of enemy to punish the players, In Golden Axe that was shadow skeletons, in P.O.W. that was instakill machine gun troops.)
If we divide the Beat Em Up “battlefield” into two halves left and right. Now, if per say ALL of the players were on the left hand side at the time of the notifier, most of these games seem to use the midway point (the camera actors Y in this case) to be a trigger point. Just branch it and if any of the player’s Y is greater than the CA’s Y? Reconnect an event tick feed to add actor world offset. Then just subtract the players Y from the CAs and that provides what you would expect here.
Here is the problem and or question, if ANY of the players are over that mid way point at the time of the notifier firing, if I use that last method then I get a quick snap by the camera. Not what I want here, most of these games seem to allow the furthest player to the right to move right from their current position and the camera moves, bypassing the midpoint mechanism, until another player gets less than a number usually right next to the left wall meaning they have fell behind and now the lead player cannot advance / move the camera. What I did here was at the “time of the notifer” took the lead player’s location and rectified the flow to a single pulse using a DO once to Set a variable.
Then using the following math.
As shown on the video, this looks correct, except you should not be able to move the camera left here. I am missing something here. And even if I figured out how to get it to not move left, that time of notifier float will have to likely be altered. That is essentially a difference of how far over the line they are. But what if that lead player was all the way to the right, moved left an inch or so (without the camera) but then moved right again? lol See what I mean?
Any help here is appreciated, thanks.