Random Title Spawner for an Endless runner

Hey,
I have a big problem with my endless runner. I want to create randomt titles( for the prototype just with a skin and without) but the titles bug in each other. I tried to figure out why this is happaning and what i could change, but… i need your help now.I´ve also tried the select way, but its the same. I´ve attached three pictures if it helps(MasterTitle=Skin-MasterTitle2=No skin). If you have a question to my blueprints please ask
Thanks in advance

Yo,

Where is the “Next Spawn Point” Located? I ask as I think this is the issue

If f.ex. you have a plane of 100x100 units you need to move only 50 to get to the boundaries from the center but that will make them overlap by a half of it’s space as the object’s pivot is probably at the center - you need to add another 50 (overall 100 which is the size of the tile) to make it appear next to each other

Here’s a little code for construction script which spawn tiles defined by X and Y value - check it to see how I managed to create a floor that you can even rescale!

The code Spawns components (plane) in pre-defined Rows and Collumns based on their size creating a floor

I commented two places as “function” - just make it to be a function so the code will look nicer, I just expanded it as the functions code is not being copied and here is the code for you: [Construction Script] Floor generator posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4

IMPORTANT:
Tile Size, Path Tiles, Rows, Collumns have to be PUBLIC and EXPOSED ON SPAWN
Collumn number and Number in row DEFAULT VALUE = 1, if you don’t change that it won’t calculate correctly and you’ll not get a squarish floor

Now you place the actor with that code on the map and play with the public variables seeing what happens

Go back to the calculation, check the workflow, compare to your game system and implement it

If that is not the issue - let me know to figure our a new solution ;]

Hey,
Thanks for your anwer, my “Next Spawn Point” is the arrow. I will try what you wrote now :slight_smile:
Edit: Thanks for your help, but It was just adding 500 to the Z, and now it stops from overlapping(like in the screenshot below).
Nice to have such helpfull people:)

  • you do not need to cast, it’s not necessary here
  • this looks like [classic z-fighting][1]

Lower the grey floor thingy and see if it goes away. Or spawn those actors a little bit higher, adding 1uu to the Z, it might be enough:

345150-screenshot-2.png

Hey,
Thank you for your answer It worked! I´ve just addet(like in your screenshot) 500 on the Z axis and now nothing overlaps anymore. Do you think it also works if i add buildings(like a modern endless runner) or do I have to pay attention to something?
Nice to have such helpfull people :slight_smile:

500 on the Z axis

Depending on how far the camera is, adding just 0.01 may work as well! Experiment with what works best for you.

This will only manifest when two parallel surfaces are very close to each other, so the distance to the camera cannot be resolved.

345181-screenshot-3.png

This effect will be more noticeable if the camera is far away.


Do you think it also works if i add
buildings(like a modern endless
runner) or do I have to pay attention
to something?

If you mean spawning things randomly, then yeah, it’s going to work just fine. There are many methods to procedural creation; the Switch you’re using works OK if you have just a handful of items. But you’d want something different if you had a couple of hundreds of choices to make :slight_smile:

Hey thanks for your help, but I’ve noticed that the tiles are now spawning irregularly(Sometimes spawn 1 title and sometimes 3 at the time). If i wait a little bit I have over 200 Actors what is really much. Do you know how I could fix that?
I think I have a big error in my Blueprints but I dont know where… i´ve tried to make an endless runner like DevAddict. Do you know how he could made this?

I think I have a big error in my
Blueprints but I dont know where…
i´ve tried to make an endless runner
like DevAddict

It’s pretty much impossible to tell what goes wrong without seeing the details. No idea what / who DevAddict is and which tutorial we’re talking about.

My suggestion is to open a new question, detail what’re trying to achieve, what you’re following and what goes wrong.

I´ll do that thank you

Great to hear you got it working!

Btw - in case you need an advice from time to time, want to show off, get to know new people, collaborate, complain about life or just share the most stupid meme you know - visit us on Discord!

I call myself Unreal Solver and I started providing some kind of support, the Discord is User friendly, we got some active people already and there are also some Achievements you can get ;] Also you’ll stay tuned with my content.

Hop in if you like the idea!

Hey, unfortunately it only works halfway. But the Idea is really good I´ll do that thanks