How to build a "endless runner" like course?

Hello everybody!
I’m trying to build a course that spawn itself like in the “endless runner” tutorial.
I was able to make it work following step by step the all thing and therefore modifying my gamemode blueprint.
I’m now trying to avoid to make changes to to game mode, so I’ve tried to pretty much do the same thing using instead a new actor blueprint.
Now, the course does appear at the beginning of the game, for the number of pieces specified in the ForLoop, but does not spawn new segments of it nor destroy the old ones while the pawn move through the trigger boxes.

I’ve used two different blueprints:
A first one wich actually contain the mesh, the trigger and the arrow (as in the tutorial) plus this Get Attach Transform funtion

and this event graph (notice the warning!)

The Second blueprint is the one I’ve inserted in the scene wich calls this first one to work and it is composed of an AddFloor function

And its event graph (wich i belive works)

55424-bp_tunnel_eventgraph.jpg

Any idea about where I might be doing wrong? I belive I still have not clear enough to concept of “casting”…this might be it! XD
Thanks in advance to anyone who would spend his/her own time taking a look to my graphs!

Well, the errors already say what part of the problem is:

BP_FTunnel does not inherit from GameMode

Whenever you get an error of this sort, something is seriously wrong in your code and the node will never execute correctly. In this case, you won’t be able to access your tunnel actor this way. Assuming the tunnel already exists in the map at that time (whether placed in the editor or spawned by another function), you could use a GetAllActorsOfClass node to find all existing actors of type BP_FTunnel. The node returns an array containing all existing actors of the given type. Use a Branch node to verify that the array’s Length is greater than 0. If this returns true (at least one tunnel was found), you’ll probably want to use the Get node with index 0 to get the first tunnel found.
If no tunnel was found, you’ll need to spawn it first.

ReturnValue is already a BP_FTile, you don’t need Cast to BP_FTile

Whenever you see a warning like this, you can leave out the Cast to XYZ node.

It works!!! Thank you ****!! :smiley:
I’ve removed the unneeded Cast node on one blueprint and built, following your instructions, this other “circuit” in the other one:

No more warnings, everything works! Thank you again!

Yes its all about trigger boxes :slight_smile:
Have a look at my advance endless runner template:
https://forums.unrealengine.com/unreal-engine/marketplace/1580543-endless-runner-shooter-template