How do I execute two tasks at the same time

I already followed the tutorial. I already tried two have two spawn actors and it didn’t work. I don’t know if I’m doing it right.
http://imgur.com/a/6vPer
http://imgur.com/a/gBHRx

Any other ideas?

I also can’t get print strings to work Do you know how?

@richardsonsam

“Any other ideas?”

this was a hint from my above post: (you’ll have to figure out their proper spawn locations from there)

“I also can’t get print strings to work Do you know how?”

type [Print String] to create the node make sure it’s exec input pin is hooked up after whatever you are checking
if you want more than just a message then you can pull from the right side output of almost any variable node (& others) & plug it into the (In String) Input Pin of the [PrintString]

** if you are following that tutorial example - & want to go right & left at the same time you’ll need another attach point & use it’s transform for the side you are adding then use it’s transform like you did for the other side. (& to spawn the course in the 2nd direction as we covered above)

  • if this is too much you may have to do more examples & build on your previous coding experience a bit more

good luck :wink:

I have some good news! I made some major progress. I did all the things you said above and it now sometimes spawns on the right side sometimes and then on the left side sometimes.(getting so close) Want to Take a look at the project file?
http://imgur.com/a/3kOAe

here is my project file if anybody want to take a look.
https://drive.google.com/drive/folders/0B8m3YT06Yd5uSE9OWEJydVB3anM?usp=sharing

What if you change it to ignore collision and always spawn*(on spawn actor node)*?

As for print string not working, it seems to be a bug with 4.14. Ever since 4.14 released I get this VERY frequently and I have to restart the editor entirely to fix it. It’s absolutely infuriating :stuck_out_tongue:

Edit:

I tried to download your project to take a look but there seem to be parts missing, the ThirdPersonBP folder is entirely empty. (nevermind seems Google Drive messed up, 2nd time download worked)

Tell me if yo figure anything out with the project, but changing collision did not change anything.

Is the intended design supposed to be that the 2-corner piece will always have straights on either side?

Edit:

I’ve got it somewhat sort of but still not really quite working. I think there’s an underlying issue with how this is currently set up preventing this. Due to it using the NextSpawnPoint variable to spawn the next tile, this mean it can ONLY extend in either left or right direction.

The system is currently set up in such a way that it will continue along one single path. Due to how I changed things a little bit, I think this is possible to workaround*(although it’d be an ugly, lazy workaround as opposed to re-designing the system a bit from scratch)*.

Edit 2:

Another reason as to why it wouldn’t work is because the variable FloorCurves inside your game mode has 3 entries, but only the first index has a set value - the other 2 are set as none.

Edit 3:

Sorry for the delay, finally found some time to look at it a bit more thoroughly. It took me some head scratching to figure out how it was all set up*(no offense, but it’s pretty messy but I understand that you’re merely in a testing phase so fully understandable)*.

I made some adjustments to BPFLOORTILE, BPFLOORTILE_BothCorner and rungamemode, it’s not an optimal solution but it shows one way of how to deal with the issue. This method causes a minor lag spike due to it extending every T-section both ways to prevent it from looking half finished in the distance.

This can very easily be optimized, considering you have a lot of static meshes, I’d recommend you look into using Instanced Static Meshes, rather than every actor having several static meshes.

One way to achieve this would be to have one world-wide actor that “hosts” the instanced static meshes. And then when a tile is destroyed, make sure the instanced meshes belonging to that one are removed from the instance. This should greatly increase performance. :slight_smile:

You can download the updated project here. I could probably only upload the .uassets but dunno if UE4 would take too kindly to that because of all references and potential changes you might have made*(backup your original project first in case you intend to overwrite!)*. Also if you wish to have this download link removed after you’ve downloaded it, either let me know here or throw me a PM and I’ll remove it!

When I try to update the old assets files by dragging the new files into the content folder inside of the project folder like the BPFLOORTILE, BPFLOORTILE_BothCorner and rungamemode, there not showing up in my game. I tried to restart unreal engine but they still wont show up. What version of unreal engine do you run? I run 4.10.4 Any ideas? Also it says to open the new project file i need some sort of vehicle plugin.

Ah that’s possibly why, I’m on 4.14.2.

I keep forgetting about that darned vehicle plugin, it’s some module for the engine itself and it keeps adding itself every single time I make a new project. It’s bloody annoying, I can try and set up some screenshots later if you prefer. Otherwise I can probably disable the vehicle plugin and re-upload it*(though for 4.14 again)*.

Thanks!! I updated unreal so I could run it and it works!! But how do I go about adding my right only corner and left only corner, and other tiles I may want to add later on???

Sorry for the late reply, these forums have been proper annoying lately. Can barely post at all sometimes :confused:

You should be able to add them to the same function that creates the t-section, with some minor editing. This is the problem with having code fixed for you, it can be a bit difficult to understand what’s going on and why things are set up the way they are.

I did add it to the function, but then it just creates spirals and the glitches because it spawns turn after turn???

You’ll have to try and read the code and understand how it’s all connected, I’ll admit it’s not the best solution but it achieved the result you wanted. Optimally I’d re-do it from scratch for optimization, making use of instanced meshes.

I was however able to easily add the left and right turn, if you look in the CreateTSection function, if casting to BothCorner fails, we can assume it was either a left or right turn. So we cast to these, if the cast succeeds - use your GetAttachTransform function and set next spawn point, then run the function that creates a new straight tile at the next spawn point.

That would be amazing if you did it from scratch to optimize it!!

Will you be able too???

Maybe if I find some time, but I have my own stuff to work on as well :rolleyes: Keep working on it meanwhile, trial and error is one of the best ways to learn - use print string to debug as much as you can. Think logically, if a cast to the BothCorner BP fails, this means with most likeliness it’s either a left- or right-only corner so try and cast to these.

As of now it’s set up in such a way that it’ll generate a specified length of straight segments both left and right after a BothCorner is spawned, maybe play around with randomizing this value to make it a bit more unique and unpredictable. It’ll be very easy to do via the for loops.

Also, the BothCorner BP now trigger 2 events depending on whether you turned left or right. This is to further generate the track and also remove the unused tiles behind the player*(both sides are stored in an array)*.

Hey I was working on it for a while today and made some major progress, but I was wondering if you could check it out quickly because sometimes the right corner or left spawn and sometimes they don’t spawn. There is a flaw in my code that I can’t find. Here are the assets I modified.https://drive.google.com/drive/folders/0B8m3YT06Yd5uWWlQUHl5NWNmcU0?usp=sharing

He doesn’t need to do anything. What you should do however, is take a step back and think about what you are trying to do and why. If the current system is not working, then maybe you need to redo it completely. If you can’t understand how or why a process is working, then do some research on your own. Sometimes a little breather will open up your eyes to new possibilities as well.

Good luck.