Download

Infinit loop on platform

Hi there,

for our studies we have to create an infinity runner. Based on several tutorials we have already created one Blueprint for a platform. In this Blueprint we have two triggervolumes. One to spawn a new platform and align it to the previous one and one to destroy the passed platform.

In our second Blueprint BP_RunGameMode we created a function to spawn 10 platforms at the start and then to always add one platform accordingly if the our Pawn walks through the Spawnvolume.

This worked fine so far. Now we tried to add a switch to randomly spawn two different platforms. For that we simply copied our already existing BP_Platform and just changed the Static Mesh in it. Unfortunately we cant start the game anymore because of the following error.

d13e9a3eed4ad9eec8cc72015122611eed74a204.jpeg

This is our platform blueprint:
8fa436950e75a8ac58d6a5659d1ba5bfefd7b531.jpeg
platform2.JPG

Additional our spawn platform blueprint:
2c174804b3b1bb17edb047229968f7c535080a63.jpeg
SpawnPlatform_2.JPG

We can’t figure out the problem with this single message line. Does anyone know where the infinity loop appears?

Thank you very much!
_basteln

Hello,
as this a component overlap maybe you overlap with a mesh or something. Try to add a branch at start of event with other actor = character as condition to see if this is the reason.

Hey,
We set the collision to “OverlapOnlyPawn”, so I don’t think that this is the solution.

rgds
_basteln

Hi basteln,

If you could humor me for just a moment, on your overlap run a cast to (yourcharacterblueprint) before you run the do once. If this does not fix it, add a delay of .01 seconds to the end of your spawn to see if breaking up the chain very slightly helps.

Hi Adam, thanks a lot. Casting to MyCharacter did the job!

rgds
_basteln

I’m happy to hear it helped. It looks like it was registering an overlap with any actor it came into contact with, including the floor mesh you were using. When this happens, it spawns a new floor every time the floor is touched, which is every single time. This would definitely cause an infinite loop!

Thank you Adam.