With the recent update (beta 203.2), the bugs in the Tween behavior were supposed to have been fixed. Either there is still an unresolved issue that got overlooked or I'm dealing with a separate matter...
I'm using Tween behavior to adjust elements of the HUD map system. Each element (Quadrant, Hallway, Boss room, and Sector) share the same exact instance variables per a Family.
Depending on where in the environment the Player is, the elements of the HUD map Tween to their new size and position according to the values of their copies of the instance variables.
So the map will look something like this when in action:
When the Player moves from one area to the next, whichever area is occupied has its map counterpart expanded to its relative size of the actual area. The origin point of each HUD map element is in the top left. So, in the image above, the top-right Quadrant would Tween from its current position to a number of pixels to its left. At the same time, its size would expand at the same Tween rate that it moves. (Some objects, like the top-left Quadrant, would have the same X/Y values all the time or only part of the time depending on which area is accessed. And the same for the sizes, as well...some values will change while others will not.)
This system was working perfectly prior to the recent update. Even after the apparent Tween behavior bug fix, the problem persists. However, the ONLY thing I changed recently has been the VALUES of the instance variables. Because I reduced size of EVERYTHING - layout, objects, etc - I had to update where the HUD elements appear on the HUD layer. I also had to update the X/Y and size values that the elements Tween to. That's it.
The problem is that, when I Tween to certain areas, the size of the element will START at a value GREATER than it was at before the Tween. For example, if I'm moving from Quadrant 2 (top-right) to Quadrant 1 (top-left), the width will Tween to its correct size but its height will start out at more than double its original size prior to the Tween (and its height isn't even supposed to change!).
The max size any element will reach is 45x45 pixels. The minimum is 15x15. But I'm seeing cases where the height and/or width starts out at as much as 90. In other cases I'm seeing where it will Tween from a smaller size to its target size when it shouldn't have changed sizes at all. As per my illustration above, moving left to right will keep the top two Quadrants the same height. But the Quardant 1 element will Tween from 15 pixels to 45. But I have quadruple checked the values for the instance variables to confirm that it shouldn't be Tweening to or from anything different.
Here is the .c3p file: https://drive.google.com/file/d/11fTotgPQCiQDkq5UtETuYOpfyLBgkuI9/view?usp=sharing
CONTROLS:
- WASD to move
- MOUSE to move the targeting reticule (make sure it's around the middle of the screen
In the project window, look for the HUD_Elements Family to find the variables being referenced here.
The event lines are on the "E Gameplay" event sheet and are at event lines 218-230.