I use an actor Character : Balloon (hot air balloon) which moves at 1300 from the ground (to avoid collisions) in order to collect spheres which are on the ground. The spheres are also actors character because they move on the axis of Z to join the balloon. Firstly, I calculate the balloon’s shortest route, which I save in a table. Then, in a For Each Loop, I move the balloon just above the sphere, this one goes up to the balloon and the balloon moves to the next sphere until the end of the collection and returns to its starting position. I use three custom events (because of the Array): BalloonToSphere, SphereToBalloon and when everything is collected BalloonToStartPosition, with Lerp vectors and Chronologies. I looked at the comments of ‘Best way to move an object to a specific location’, I had a glimmer of hope because I thought there was an incompatibility between array and TimeLine, but moving the Balloon is not correct, no synchronization (using an array is ok, collection works). I can’t make the three custom events one after the other, the TimeLines overlap, I’ve used Vinterp, Lerp, Add movement input, TimeLine, Event Tick, Timers… without success, I’ve been working on the problem for a long time without finding a correct visual solution, it’s a real headache, I’ve tried everything except splines. Thank you for your help.
Hi ClockworkOcean, thanks for your help, yes I control the moves in GameMode (see SCREEN IMPR) I also attach the custom events for BP_Balloon and BP_Mana and every item has it’s own timeline. The problem is in Gamemode with MoveBalloon?
I think I see the problem: a for loop will not wait for anything, it will just run. I’m assuming your balloon just moves to the last position?
Best thing is to write your own loop in the balloon ( or game mode ). So just get the first point, move the ballon there, then tell the mana to follow, increment index, move to the next mana, etc…
Also, I wouldn’t try attaching, that might be a problem. Better to just code the mana to move to where the balloon currently is. You would need ‘rinterp to const’ to do that. You can only use a timeline for the mana, if the balloon will wait until the mana has reached it, before moving on.
Hi ClockworkOcean, it’s good to have some help with a problem that’s going to drive me crazy, I must say that there’s no shortage of pitfalls in Unreal Engine. For the balloon movement, if the collection is 1 (which isn’t the aim) the movement is good for the balloon but not for the mana, which is why I’ve attached it to the balloon, above 1 it goes very fast and it’s wrong. I’ve coded all this, I’ll come back to you to tell you that I’ve succeeded (or for any other information). Many thanks for everything.
Hello ClockworkOcean, I have several problems that impact synchronisation:
the mana distances are different and the timeline duration is 3 seconds.
I can’t get the balloon to wait for the mana to reach it. I’ve added an OnComponentBeginOverlap to Mana’s blueprint with a boolean set to true and also in GameMode before executing the MoveManaToBalloon, the mana moves when the balloon returns to the castle, so it’s wrong.
For the rinterp to Constant, the movement is not correct, I think because of the Deltatime and Interpspeed settings.
Thanks for all your help.
No it’s never ok, I put a boolean after the Finished of the balloon timeline, the balloon doesn’t wait, when the mana moves the balloon is already back to its starting position.
the balloon must arrive at its destination (MoveManatoBalloon must not execute): the mana location X,Y and Z must be 1300. When it reaches its destination, the mana can rise to 135 or 1300. Once the mana has reached its destination (the balloon’s location), collection can continue.
The delays need to be as long as it takes to do each process. If you want to do it without the delays, then you need to separate the custom events, and make the balloon and mana call each other. ( you still can’t use a loop ).
Hi ClockworkOcean
Thank you for taking the time to make me a Blueprint table. I still have a few questions:
Is it possible to calculate a delay, because delays depend on distance and the distance of manas is never the same. For the delay I use the distance divided by the speed of the object, should I multiply it by a Get world delta seconds?
The balloon and the manas each have their own custom event in BP_Balloon and BP_Mana. If I remove the time limits, I’ll call both of them with events Dispatcher?
I still have two For Each Loops that don’t use a TimeLine, should I modify them?
I’ll make the changes and let you know the result.
Thanks again for all your help and time.
Hi ClockworkOcean
I have a problem with MoveToBalloon (target is BP_mana)
Blueprint Runtime Error: ‘Accessed None trying to read property CallFunc_Array_Get_Item_1’. Node: Move Mana to Balloon Graph: EventGraph Function: Execute Ubergraph BP Balloon Blueprint: BP_Balloon
Do you have an idea? Thanks
no it doesn’t work that there’s an error, I spent some time redoing the balloon’s path because the mana locations are spawned when an enemy is destroyed. In the ManaNav table (in GameMode) I only have BP_Mana instances that are ranked to have an optimised path.
I’ve changed Mana to ManaNav, so it’s not in the Balloon Beginplay but in GameMode.
The Balloon is not in the beginplay of BP_mana but in the Beginplay of GameMode (balloonRef)
The MoveBalloon is not executed in the Balloon Beginplay but in the CollectedOwnMana of the GameMode
The rest is identical. I can send you some screen shots, thank you.