I created this structure (blueprint) for a simple Barchart. The boxes must be scaled by reading some data from a csv, animated by a timeline! In this structure, the animation is applied only to the last bar, the rest of the bars remain in place. Can someone tell me where to put that ■■■■ timeline so that it applies the animation to all the boxes correctly? I tried to place it before Get Data Table, then it applies the animation to all the boxes, but the Reverse function no longer works, as if an instance of that animation were created.
timeline is asyncronic…its like a delay…it has its own time. each time you reach PLAY it just runs the timeline (if stoped starts playing, if playing does nothing).
For loop runs the whole loop (x to y) and stops everything until it finished before continue the flow of the game. Its not async. thats why you can use For loops in functions but cant use timelines…note timeline node has a clock on it. that means async (like events)
You must create those components and put all in an array, then PLAY FROM START and in UPDATE from timeline put another for loop that iterates all the components (take the array and make a FOR EACH LOOP) and update the scale there.
Also you have a flip flop…so you create the static meshes and then you play in reverse…then you create AGAIN and reverse CREATE reverse…you are adding static meshes on each FLIP and dont getting rid of it on the FLOPS…here is some that can work deleting the static meshes when reverse ends:
anyway maybe is better to create that array of static meshes at the beginning of the game and keep them hidden…then instead of create/destroy you just unhide, use and then hide again.
Thank you very much for the support, I will try this, I hope I can do it! I’m at the beginning of working in the blueprint and it’s very difficult, at least so far
The adventure is not over! Now I want to add the percentages!
I created a function to always position the percentage above the bar, then I created another For Each Loop for the text component, I linked this function right after the newly created for each loop! But only the first percentage follows the height of the bar! How do I convince the other percentages to follow the example of the first one
You are the best! Thank you very much for your help, but the wonderful function is not working! Only the first percentage follows the first bar and the rest does not! What am I not doing right?